diff --git a/sstables/compaction.cc b/sstables/compaction.cc index c8a3883b7a..27ccef6abf 100644 --- a/sstables/compaction.cc +++ b/sstables/compaction.cc @@ -112,7 +112,7 @@ static void delete_sstables_for_interrupted_compaction(std::vector get_uncompacting_sstables(column_family& cf, std::vector& sstables) { +static std::vector get_uncompacting_sstables(column_family& cf, std::vector sstables) { auto all_sstables = boost::copy_range>(*cf.get_sstables_including_compacted_undeleted()); boost::sort(all_sstables, [] (const shared_sstable& x, const shared_sstable& y) { return x->generation() < y->generation(); @@ -541,7 +541,7 @@ reshard_sstables(std::vector sstables, column_family& cf, std::f } std::unordered_set -get_fully_expired_sstables(column_family& cf, std::vector& compacting, gc_clock::time_point gc_before) { +get_fully_expired_sstables(column_family& cf, const std::vector& compacting, gc_clock::time_point gc_before) { clogger.debug("Checking droppable sstables in {}.{}", cf.schema()->ks_name(), cf.schema()->cf_name()); if (compacting.empty()) { diff --git a/sstables/compaction.hh b/sstables/compaction.hh index 4764f90c33..33f8a81f9d 100644 --- a/sstables/compaction.hh +++ b/sstables/compaction.hh @@ -132,5 +132,5 @@ namespace sstables { // In simpler words, a sstable is fully expired if all of its live cells with TTL is expired // and possibly doesn't contain any tombstone that covers cells in other sstables. std::unordered_set - get_fully_expired_sstables(column_family& cf, std::vector& compacting, gc_clock::time_point gc_before); + get_fully_expired_sstables(column_family& cf, const std::vector& compacting, gc_clock::time_point gc_before); } diff --git a/sstables/leveled_manifest.hh b/sstables/leveled_manifest.hh index 8eca79b51e..f37cca5132 100644 --- a/sstables/leveled_manifest.hh +++ b/sstables/leveled_manifest.hh @@ -333,7 +333,7 @@ public: } template - static std::vector overlapping(const schema& s, std::vector& candidates, T& others) { + static std::vector overlapping(const schema& s, const std::vector& candidates, const T& others) { assert(!candidates.empty()); /* * Picking each sstable from others that overlap one of the sstable of candidates is not enough @@ -364,7 +364,7 @@ public: } template - static std::vector overlapping(const schema& s, sstables::shared_sstable& sstable, T& others) { + static std::vector overlapping(const schema& s, const sstables::shared_sstable& sstable, const T& others) { return overlapping(s, sstable->get_first_decorated_key()._token, sstable->get_last_decorated_key()._token, others); } @@ -372,7 +372,7 @@ public: * @return sstables from @param sstables that contain keys between @param start and @param end, inclusive. */ template - static std::vector overlapping(const schema& s, dht::token start, dht::token end, T& sstables) { + static std::vector overlapping(const schema& s, dht::token start, dht::token end, const T& sstables) { assert(start <= end); std::vector overlapped;