diff --git a/compaction/leveled_compaction_strategy.cc b/compaction/leveled_compaction_strategy.cc index a2d67ac4eb..50f2d0dd6f 100644 --- a/compaction/leveled_compaction_strategy.cc +++ b/compaction/leveled_compaction_strategy.cc @@ -11,8 +11,6 @@ #include "compaction_strategy_state.hh" #include -#include - namespace sstables { leveled_compaction_strategy_state& leveled_compaction_strategy::get_state(table_state& table_s) const { @@ -50,10 +48,9 @@ compaction_descriptor leveled_compaction_strategy::get_sstables_for_compaction(t for (auto level = int(manifest.get_level_count()); level >= 0; level--) { auto& sstables = manifest.get_level(level); // filter out sstables which droppable tombstone ratio isn't greater than the defined threshold. - auto e = boost::range::remove_if(sstables, [this, compaction_time, &table_s] (const sstables::shared_sstable& sst) -> bool { + std::erase_if(sstables, [this, compaction_time, &table_s] (const sstables::shared_sstable& sst) -> bool { return !worth_dropping_tombstones(sst, compaction_time, table_s); }); - sstables.erase(e, sstables.end()); if (sstables.empty()) { continue; } diff --git a/compaction/size_tiered_compaction_strategy.cc b/compaction/size_tiered_compaction_strategy.cc index bc11399215..f0878e37fa 100644 --- a/compaction/size_tiered_compaction_strategy.cc +++ b/compaction/size_tiered_compaction_strategy.cc @@ -11,8 +11,6 @@ #include "size_tiered_compaction_strategy.hh" #include "cql3/statements/property_definitions.hh" -#include - namespace sstables { static long validate_sstable_size(const std::map& options) { @@ -242,10 +240,9 @@ size_tiered_compaction_strategy::get_sstables_for_compaction(table_state& table_ // tombstone purge, i.e. less likely to shadow even older data. for (auto&& sstables : buckets | std::views::reverse) { // filter out sstables which droppable tombstone ratio isn't greater than the defined threshold. - auto e = boost::range::remove_if(sstables, [this, compaction_time, &table_s] (const sstables::shared_sstable& sst) -> bool { + std::erase_if(sstables, [this, compaction_time, &table_s] (const sstables::shared_sstable& sst) -> bool { return !worth_dropping_tombstones(sst, compaction_time, table_s); }); - sstables.erase(e, sstables.end()); if (sstables.empty()) { continue; } diff --git a/compaction/time_window_compaction_strategy.cc b/compaction/time_window_compaction_strategy.cc index 8ef4e8a0fe..21cf978438 100644 --- a/compaction/time_window_compaction_strategy.cc +++ b/compaction/time_window_compaction_strategy.cc @@ -14,7 +14,6 @@ #include "compaction_strategy_state.hh" #include -#include #include @@ -399,10 +398,9 @@ time_window_compaction_strategy::get_next_non_expired_sstables(table_state& tabl // if there is no sstable to compact in standard way, try compacting single sstable whose droppable tombstone // ratio is greater than threshold. - auto e = boost::range::remove_if(non_expiring_sstables, [this, compaction_time, &table_s] (const shared_sstable& sst) -> bool { + std::erase_if(non_expiring_sstables, [this, compaction_time, &table_s] (const shared_sstable& sst) -> bool { return !worth_dropping_tombstones(sst, compaction_time, table_s); }); - non_expiring_sstables.erase(e, non_expiring_sstables.end()); if (non_expiring_sstables.empty()) { return {}; } diff --git a/locator/abstract_replication_strategy.cc b/locator/abstract_replication_strategy.cc index b544a9f2cb..99111a6ce3 100644 --- a/locator/abstract_replication_strategy.cc +++ b/locator/abstract_replication_strategy.cc @@ -10,7 +10,6 @@ #include "locator/tablet_replication_strategy.hh" #include "utils/class_registrator.hh" #include "exceptions/exceptions.hh" -#include #include #include #include diff --git a/replica/table.cc b/replica/table.cc index c155d5f0ec..066e876c51 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -53,7 +53,6 @@ #include "replica/global_table_ptr.hh" #include "locator/tablets.hh" -#include #include #include #include "utils/error_injection.hh" @@ -1970,10 +1969,9 @@ compaction_group::update_sstable_sets_on_compaction_completion(sstables::compact // or they could stay forever in the set, resulting in deleted files remaining // opened and disk space not being released until shutdown. auto undo_compacted_but_not_deleted = defer([&] { - auto e = boost::range::remove_if(sstables_compacted_but_not_deleted, [&] (sstables::shared_sstable sst) { + std::erase_if(sstables_compacted_but_not_deleted, [&] (sstables::shared_sstable sst) { return s.contains(sst); }); - sstables_compacted_but_not_deleted.erase(e, sstables_compacted_but_not_deleted.end()); _t.rebuild_statistics(); }); diff --git a/service/mapreduce_service.cc b/service/mapreduce_service.cc index 2a434b196f..658041b91d 100644 --- a/service/mapreduce_service.cc +++ b/service/mapreduce_service.cc @@ -8,7 +8,6 @@ #include "service/mapreduce_service.hh" -#include #include #include #include @@ -197,8 +196,8 @@ static const dht::token& end_token(const dht::partition_range& r) { } static void retain_local_endpoints(const locator::topology& topo, host_id_vector_replica_set& eps) { - auto itend = boost::range::remove_if(eps, std::not_fn(topo.get_local_dc_filter())); - eps.erase(itend, eps.end()); + auto [b, e] = std::ranges::remove_if(eps, std::not_fn(topo.get_local_dc_filter())); + eps.erase(b, e); } // Given an initial partition range vector, iterate through ranges owned by