Skip to content

Commit

Permalink
boost/adaptors
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jan 27, 2025
1 parent ecd6845 commit 1fd7e4e
Show file tree
Hide file tree
Showing 25 changed files with 5 additions and 46 deletions.
1 change: 0 additions & 1 deletion api/storage_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <functional>
#include <iterator>
#include <chrono>
#include <boost/range/adaptor/map.hpp>
#include <boost/algorithm/string/trim_all.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/functional/hash.hpp>
Expand Down
1 change: 0 additions & 1 deletion compaction/incremental_backlog_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "incremental_backlog_tracker.hh"
#include "sstables/sstables.hh"
#include <boost/range/adaptor/map.hpp>

using namespace sstables;

Expand Down
1 change: 0 additions & 1 deletion cql3/statements/alter_type_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "service/storage_proxy.hh"
#include "data_dictionary/data_dictionary.hh"
#include "data_dictionary/keyspace_metadata.hh"
#include "boost/range/adaptor/map.hpp"
#include "data_dictionary/user_types_metadata.hh"

namespace cql3 {
Expand Down
1 change: 0 additions & 1 deletion cql3/statements/create_table_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <inttypes.h>
#include <boost/regex.hpp>

#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/adjacent_find.hpp>
#include <seastar/core/coroutine.hh>

Expand Down
2 changes: 0 additions & 2 deletions cql3/statements/drop_type_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include "cql3/query_processor.hh"
#include "cql3/functions/functions.hh"

#include "boost/range/adaptor/map.hpp"

#include "service/migration_manager.hh"
#include "service/storage_proxy.hh"
#include "data_dictionary/data_dictionary.hh"
Expand Down
2 changes: 0 additions & 2 deletions db/batchlog_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <seastar/core/metrics.hh>
#include <seastar/core/coroutine.hh>
#include <seastar/core/sleep.hh>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/adaptor/sliced.hpp>

#include "batchlog_manager.hh"
#include "mutation/canonical_mutation.hh"
Expand Down
1 change: 0 additions & 1 deletion db/commitlog/commitlog_replayer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <algorithm>
#include <unordered_map>
#include <ranges>
#include <boost/range/adaptor/map.hpp>

#include <seastar/core/future.hh>
#include <seastar/core/sharded.hh>
Expand Down
3 changes: 3 additions & 0 deletions db/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ config_from_string(std::string_view value) {
template <>
sstring
config_from_string(std::string_view value) {
// boost::lexical_cast fails when an input stream reaches EOF, incorrectly
// indicating parsing failure even for valid empty string conversions. so we have
// to specialize for sstring.
return sstring(value);
}

Expand Down
2 changes: 0 additions & 2 deletions db/cql_type_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0)
*/
#include <unordered_map>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/adaptor/sliced.hpp>
#include <seastar/coroutine/maybe_yield.hh>

#include "replica/database.hh"
Expand Down
3 changes: 0 additions & 3 deletions db/hints/internal/hint_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include <seastar/core/smp.hh>
#include <seastar/core/sstring.hh>

// Boost features.
#include <boost/range/adaptor/map.hpp>

// Scylla includes.
#include "db/hints/internal/hint_logger.hh"
#include <seastar/core/future.hh>
Expand Down
1 change: 0 additions & 1 deletion db/hints/resource_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "manager.hh"
#include "utils/log.hh"
#include <boost/range/algorithm/for_each.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/numeric.hpp>
#include "utils/disk-error-handler.hh"
#include "seastarx.hh"
Expand Down
1 change: 0 additions & 1 deletion db/per_partition_rate_limit_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

#include <optional>
#include <boost/range/adaptor/map.hpp>
#include "exceptions/exceptions.hh"
#include "serializer.hh"
#include "schema/schema.hh"
Expand Down
5 changes: 0 additions & 5 deletions db/schema_applier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
#include <seastar/core/loop.hh>
#include <seastar/core/on_internal_error.hh>

#include <boost/algorithm/string/predicate.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/adaptor/indirected.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/join.hpp>

#include <fmt/ranges.h>
Expand Down
4 changes: 0 additions & 4 deletions db/schema_tables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@
#include <seastar/core/loop.hh>
#include <seastar/core/on_internal_error.hh>

#include <boost/algorithm/string/predicate.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/adaptor/indirected.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/join.hpp>

#include "compaction/compaction_strategy.hh"
Expand Down
2 changes: 0 additions & 2 deletions db/view/view_update_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <seastar/core/timed_out_error.hh>
#include "gms/inet_address.hh"
#include <seastar/util/defer.hh>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/numeric.hpp>
#include "replica/database.hh"
#include "view_update_generator.hh"
#include "utils/error_injection.hh"
Expand Down
3 changes: 0 additions & 3 deletions ent/encryption/encryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
#include <openssl/sha.h>
#include <openssl/hmac.h>

#include <boost/range/adaptor/map.hpp>
#include <boost/filesystem.hpp>

#include <seastar/core/seastar.hh>
#include <seastar/core/future-util.hh>
#include <seastar/core/shared_ptr.hh>
Expand Down
5 changes: 1 addition & 4 deletions index/secondary_index_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#include "concrete_types.hh"
#include "db/tags/extension.hh"

#include <boost/range/adaptor/map.hpp>
#include <boost/algorithm/string/predicate.hpp>

namespace secondary_index {

index::index(const sstring& target_column, const index_metadata& im)
Expand Down Expand Up @@ -156,7 +153,7 @@ sstring index_table_name(const sstring& index_name) {
}

sstring index_name_from_table_name(const sstring& table_name) {
if (table_name.size() < 7 || !boost::algorithm::ends_with(table_name, "_index")) {
if (table_name.size() < 7 || table_name.ends_with("_index")) {
throw std::runtime_error(format("Table {} does not have _index suffix", table_name));
}
return table_name.substr(0, table_name.size() - 6); // remove the _index suffix from an index name;
Expand Down
2 changes: 0 additions & 2 deletions querier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include "utils/log.hh"
#include "utils/error_injection.hh"

#include <boost/range/adaptor/map.hpp>

namespace query {

logging::logger qlogger("querier_cache");
Expand Down
2 changes: 0 additions & 2 deletions reader_concurrency_semaphore_group.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <unordered_map>
#include <optional>
#include "reader_concurrency_semaphore.hh"
#include <boost/range/adaptor/map.hpp>
#include <boost/range/numeric.hpp>

// The reader_concurrency_semaphore_group is a group of semaphores that shares a common pool of memory,
// the memory is dynamically divided between them according to a relative slice of shares each semaphore
Expand Down
3 changes: 1 addition & 2 deletions replica/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <seastar/core/metrics.hh>
#include "sstables/sstables.hh"
#include "sstables/sstables_manager.hh"
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/min_element.hpp>
#include <boost/container/static_vector.hpp>
#include "mutation/frozen_mutation.hh"
Expand Down Expand Up @@ -182,7 +181,7 @@ phased_barrier_top_10_counts(const database::tables_metadata& tables_metadata, s

// If we are here, min_element->first < count
*min_element = {count, table_list({table.get()})};
min_element = &*boost::min_element(res, less);
min_element = &*std::ranges::min_element(res, less);
});

std::ranges::sort(res, less);
Expand Down
1 change: 0 additions & 1 deletion replica/distributed_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "tracing/trace_keyspace_helper.hh"
#include "db/view/view_update_checks.hh"
#include <unordered_map>
#include <boost/range/adaptor/map.hpp>
#include "db/view/view_builder.hh"

extern logging::logger dblog;
Expand Down
2 changes: 0 additions & 2 deletions service/topology_state_machine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "utils/log.hh"
#include "db/system_keyspace.hh"

#include <boost/range/adaptor/map.hpp>

namespace service {

logging::logger tsmlogger("topology_state_machine");
Expand Down
1 change: 0 additions & 1 deletion sstables/sstable_directory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <seastar/core/coroutine.hh>
#include <seastar/coroutine/parallel_for_each.hh>
#include <seastar/util/file.hh>
#include <boost/range/adaptor/map.hpp>
#include <boost/algorithm/string.hpp>
#include "sstables/sstable_directory.hh"
#include "sstables/sstables.hh"
Expand Down
1 change: 0 additions & 1 deletion streaming/stream_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "mutation_writer/multishard_writer.hh"
#include "sstables/sstable_set.hh"
#include "db/view/view_update_checks.hh"
#include <boost/range/adaptor/map.hpp>
#include "replica/database.hh"
#include "streaming/stream_mutation_fragments_cmd.hh"
#include "consumer.hh"
Expand Down
1 change: 0 additions & 1 deletion test/boost/cdc_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <seastar/testing/test_case.hh>
#include <seastar/testing/thread_test_case.hh>
#include <string>
#include <boost/range/adaptor/map.hpp>
#include <fmt/ranges.h>
#include <fmt/std.h>

Expand Down

0 comments on commit 1fd7e4e

Please sign in to comment.