From a1acf6854bfe5d5a7e7efe53a6ec77adfb5a95de Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Thu, 2 Nov 2023 17:00:31 +0200 Subject: [PATCH] everywhere: reduce dependencies on i_partitioner.hh Signed-off-by: Benny Halevy --- compaction/compaction_descriptor.hh | 1 - compaction/compaction_fwd.hh | 10 ++++------ compaction/compaction_manager.hh | 5 +++++ cql3/restrictions/statement_restrictions.cc | 1 + db/view/build_progress_virtual_reader.hh | 1 - db/view/row_locking.hh | 2 +- db/view/view.hh | 1 - db/view/view_builder.hh | 1 - db/view/view_updating_consumer.hh | 1 - db/virtual_table.cc | 1 + dht/i_partitioner_fwd.hh | 1 + gms/endpoint_state.cc | 1 + gms/inet_address.hh | 2 ++ gms/versioned_value.hh | 3 ++- idl/forward_request.idl.hh | 2 +- idl/paging_state.idl.hh | 2 +- idl/partition_checksum.idl.hh | 5 +++-- locator/abstract_replication_strategy.hh | 2 +- locator/tablets.cc | 1 - locator/token_metadata.hh | 2 +- locator/token_range_splitter.hh | 2 +- multishard_mutation_query.hh | 2 +- mutation/json.hh | 4 ++-- mutation/mutation.cc | 1 + mutation/mutation.hh | 1 - mutation_writer/multishard_writer.hh | 2 +- mutation_writer/shard_based_splitting_writer.cc | 1 + querier.cc | 2 +- query-request.hh | 2 +- query_ranges_to_vnodes.cc | 1 + query_ranges_to_vnodes.hh | 2 +- readers/combined.hh | 3 ++- readers/evictable.hh | 6 +++++- readers/flat_mutation_reader_v2.hh | 2 +- readers/mutation_readers.cc | 1 - readers/mutation_source.hh | 1 - schema/schema.cc | 1 - schema/schema_builder.hh | 1 - service/pager/paging_state.hh | 1 - service/topology_state_machine.cc | 1 + service/topology_state_machine.hh | 1 - sstables/index_entry.hh | 1 + sstables/key.hh | 2 +- sstables/sstable_mutation_reader.hh | 2 -- sstables/sstable_set.hh | 2 +- sstables/writer.hh | 1 + streaming/stream_detail.hh | 1 - streaming/stream_manager.hh | 4 ++++ streaming/stream_plan.hh | 1 - streaming/stream_request.hh | 1 - streaming/stream_session.hh | 1 - test/lib/key_utils.cc | 1 + test/lib/key_utils.hh | 5 ++++- test/lib/mutation_assertions.hh | 1 + test/lib/random_schema.hh | 1 - test/lib/sstable_utils.hh | 1 - test/manual/row_locker_test.cc | 1 + test/perf/perf_row_cache_update.cc | 1 + test/unit/row_cache_alloc_stress_test.cc | 1 + tools/lua_sstable_consumer.cc | 1 + tools/scylla-types.cc | 1 + view_info.hh | 1 - 62 files changed, 64 insertions(+), 50 deletions(-) diff --git a/compaction/compaction_descriptor.hh b/compaction/compaction_descriptor.hh index 6b81170ebe..d69090b295 100644 --- a/compaction/compaction_descriptor.hh +++ b/compaction/compaction_descriptor.hh @@ -17,7 +17,6 @@ #include "sstables/types_fwd.hh" #include "sstables/sstable_set.hh" #include "utils/UUID.hh" -#include "dht/i_partitioner.hh" #include "compaction_fwd.hh" namespace sstables { diff --git a/compaction/compaction_fwd.hh b/compaction/compaction_fwd.hh index bd8b118134..f4a5777699 100644 --- a/compaction/compaction_fwd.hh +++ b/compaction/compaction_fwd.hh @@ -9,7 +9,9 @@ #pragma once -#include "dht/i_partitioner.hh" +#include + +#include "dht/i_partitioner_fwd.hh" namespace compaction { @@ -17,10 +19,6 @@ class table_state; class strategy_control; struct compaction_state; -using owned_ranges_ptr = lw_shared_ptr; - -inline owned_ranges_ptr make_owned_ranges_ptr(dht::token_range_vector&& ranges) { - return make_lw_shared(std::move(ranges)); -} +using owned_ranges_ptr = seastar::lw_shared_ptr; } // namespace compaction diff --git a/compaction/compaction_manager.hh b/compaction/compaction_manager.hh index 009d23b230..b35e12cbc8 100644 --- a/compaction/compaction_manager.hh +++ b/compaction/compaction_manager.hh @@ -63,6 +63,11 @@ class offstrategy_compaction_task_executor; class rewrite_sstables_compaction_task_executor; class cleanup_sstables_compaction_task_executor; class validate_sstables_compaction_task_executor; + +inline owned_ranges_ptr make_owned_ranges_ptr(dht::token_range_vector&& ranges) { + return make_lw_shared(std::move(ranges)); +} + } // Compaction manager provides facilities to submit and track compaction jobs on // behalf of existing tables. diff --git a/cql3/restrictions/statement_restrictions.cc b/cql3/restrictions/statement_restrictions.cc index 0be5af5501..9d3eb6e868 100644 --- a/cql3/restrictions/statement_restrictions.cc +++ b/cql3/restrictions/statement_restrictions.cc @@ -32,6 +32,7 @@ #include "types/list.hh" #include "types/map.hh" #include "types/set.hh" +#include "dht/i_partitioner.hh" namespace { struct maybe_column_definition { diff --git a/db/view/build_progress_virtual_reader.hh b/db/view/build_progress_virtual_reader.hh index 3acb3af476..a2de21e2b1 100644 --- a/db/view/build_progress_virtual_reader.hh +++ b/db/view/build_progress_virtual_reader.hh @@ -9,7 +9,6 @@ #include "replica/database.hh" #include "db/system_keyspace.hh" #include "db/timeout_clock.hh" -#include "dht/i_partitioner.hh" #include "readers/flat_mutation_reader_v2.hh" #include "mutation/mutation_fragment.hh" #include "query-request.hh" diff --git a/db/view/row_locking.hh b/db/view/row_locking.hh index f472520d98..71daaaef5e 100644 --- a/db/view/row_locking.hh +++ b/db/view/row_locking.hh @@ -27,7 +27,7 @@ #include "db/timeout_clock.hh" #include "schema/schema_fwd.hh" -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "query-request.hh" #include "utils/estimated_histogram.hh" #include "utils/latency.hh" diff --git a/db/view/view.hh b/db/view/view.hh index 84341c62db..08dab49d92 100644 --- a/db/view/view.hh +++ b/db/view/view.hh @@ -8,7 +8,6 @@ #pragma once -#include "dht/i_partitioner.hh" #include "gc_clock.hh" #include "query-request.hh" #include "schema/schema_fwd.hh" diff --git a/db/view/view_builder.hh b/db/view/view_builder.hh index cd7c0e422a..102097fde2 100644 --- a/db/view/view_builder.hh +++ b/db/view/view_builder.hh @@ -8,7 +8,6 @@ #pragma once -#include "dht/i_partitioner.hh" #include "query-request.hh" #include "service/migration_listener.hh" #include "utils/serialized_action.hh" diff --git a/db/view/view_updating_consumer.hh b/db/view/view_updating_consumer.hh index dd6954cddb..609a4c34fb 100644 --- a/db/view/view_updating_consumer.hh +++ b/db/view/view_updating_consumer.hh @@ -8,7 +8,6 @@ #pragma once -#include "dht/i_partitioner.hh" #include "schema/schema_fwd.hh" #include "mutation/mutation_fragment.hh" #include "sstables/shared_sstable.hh" diff --git a/db/virtual_table.cc b/db/virtual_table.cc index fc360323f2..407b10027d 100644 --- a/db/virtual_table.cc +++ b/db/virtual_table.cc @@ -13,6 +13,7 @@ #include "readers/reversing_v2.hh" #include "readers/forwardable_v2.hh" #include "readers/slicing_filtering.hh" +#include "dht/i_partitioner.hh" namespace db { diff --git a/dht/i_partitioner_fwd.hh b/dht/i_partitioner_fwd.hh index e3ebee6be2..5bf3895023 100644 --- a/dht/i_partitioner_fwd.hh +++ b/dht/i_partitioner_fwd.hh @@ -23,6 +23,7 @@ namespace dht { class decorated_key; class ring_position; class token; +class sharder; using partition_range = nonwrapping_range; using token_range = nonwrapping_range; diff --git a/gms/endpoint_state.cc b/gms/endpoint_state.cc index 878f90367a..05bce9aa9e 100644 --- a/gms/endpoint_state.cc +++ b/gms/endpoint_state.cc @@ -11,6 +11,7 @@ #include "gms/endpoint_state.hh" #include #include +#include namespace gms { diff --git a/gms/inet_address.hh b/gms/inet_address.hh index 9dba863937..c92b2eb60c 100644 --- a/gms/inet_address.hh +++ b/gms/inet_address.hh @@ -8,6 +8,8 @@ #pragma once +#include + #include #include #include diff --git a/gms/versioned_value.hh b/gms/versioned_value.hh index 0c6e744b3b..72f2e8e9fd 100644 --- a/gms/versioned_value.hh +++ b/gms/versioned_value.hh @@ -15,7 +15,8 @@ #include "locator/host_id.hh" #include "version_generator.hh" #include "gms/inet_address.hh" -#include "dht/i_partitioner.hh" +#include "dht/token.hh" +#include "schema/schema_fwd.hh" #include "utils/to_string.hh" #include "version.hh" #include "cdc/generation_id.hh" diff --git a/idl/forward_request.idl.hh b/idl/forward_request.idl.hh index 3e48e21def..33d5432459 100644 --- a/idl/forward_request.idl.hh +++ b/idl/forward_request.idl.hh @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "idl/read_command.idl.hh" #include "idl/consistency_level.idl.hh" diff --git a/idl/paging_state.idl.hh b/idl/paging_state.idl.hh index fce86581b7..0d8742ca75 100644 --- a/idl/paging_state.idl.hh +++ b/idl/paging_state.idl.hh @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "service/pager/paging_state.hh" #include "idl/range.idl.hh" diff --git a/idl/partition_checksum.idl.hh b/idl/partition_checksum.idl.hh index 8999d31e6a..eba12b42b7 100644 --- a/idl/partition_checksum.idl.hh +++ b/idl/partition_checksum.idl.hh @@ -6,14 +6,15 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "dht/i_partitioner.hh" +#include "dht/decorated_key.hh" #include "gms/inet_address_serializer.hh" +#include "node_ops/id.hh" #include "idl/keys.idl.hh" +#include "idl/position_in_partition.idl.hh" #include "idl/uuid.idl.hh" #include "idl/frozen_mutation.idl.hh" #include "idl/token.idl.hh" -#include "node_ops/id.hh" class repair_hash { uint64_t hash; diff --git a/locator/abstract_replication_strategy.hh b/locator/abstract_replication_strategy.hh index 6df2e36ff3..9340a87100 100644 --- a/locator/abstract_replication_strategy.hh +++ b/locator/abstract_replication_strategy.hh @@ -17,7 +17,7 @@ #include "gms/feature_service.hh" #include "locator/snitch_base.hh" #include "locator/token_range_splitter.hh" -#include "dht/i_partitioner.hh" +#include "dht/token-sharding.hh" #include "token_metadata.hh" #include "snitch_base.hh" #include diff --git a/locator/tablets.cc b/locator/tablets.cc index d016639570..5d4d709f9a 100644 --- a/locator/tablets.cc +++ b/locator/tablets.cc @@ -11,7 +11,6 @@ #include "locator/tablet_metadata_guard.hh" #include "locator/tablet_sharder.hh" #include "locator/token_range_splitter.hh" -#include "dht/i_partitioner.hh" #include "types/types.hh" #include "types/tuple.hh" #include "types/set.hh" diff --git a/locator/token_metadata.hh b/locator/token_metadata.hh index fda76f6ed0..66122cc34a 100644 --- a/locator/token_metadata.hh +++ b/locator/token_metadata.hh @@ -14,7 +14,7 @@ #include #include #include "gms/inet_address.hh" -#include "dht/i_partitioner.hh" +#include "dht/ring_position.hh" #include "inet_address_vectors.hh" #include #include diff --git a/locator/token_range_splitter.hh b/locator/token_range_splitter.hh index 8b805f5ea8..ac55d65fd1 100644 --- a/locator/token_range_splitter.hh +++ b/locator/token_range_splitter.hh @@ -8,7 +8,7 @@ #pragma once -#include "dht/i_partitioner.hh" +#include "dht/ring_position.hh" #include "dht/token.hh" #include "locator/token_metadata_fwd.hh" diff --git a/multishard_mutation_query.hh b/multishard_mutation_query.hh index 2d5c4315e1..ce70dddf44 100644 --- a/multishard_mutation_query.hh +++ b/multishard_mutation_query.hh @@ -12,7 +12,7 @@ #include "schema/schema_fwd.hh" #include "cache_temperature.hh" #include "db/timeout_clock.hh" -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include diff --git a/mutation/json.hh b/mutation/json.hh index 8766df4a1d..6c765121b1 100644 --- a/mutation/json.hh +++ b/mutation/json.hh @@ -6,8 +6,8 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "dht/i_partitioner.hh" -#include "schema/schema_fwd.hh" +#include "dht/token.hh" +#include "schema/schema.hh" #include "utils/rjson.hh" /* diff --git a/mutation/mutation.cc b/mutation/mutation.cc index 8ea30b6367..728bfc1666 100644 --- a/mutation/mutation.cc +++ b/mutation/mutation.cc @@ -11,6 +11,7 @@ #include "mutation_rebuilder.hh" #include "mutation/json.hh" #include "types/tuple.hh" +#include "dht/i_partitioner.hh" mutation::data::data(dht::decorated_key&& key, schema_ptr&& schema) : _schema(std::move(schema)) diff --git a/mutation/mutation.hh b/mutation/mutation.hh index 4fcab64d07..559d8b38a9 100644 --- a/mutation/mutation.hh +++ b/mutation/mutation.hh @@ -13,7 +13,6 @@ #include "mutation_partition.hh" #include "keys.hh" #include "schema/schema_fwd.hh" -#include "dht/i_partitioner.hh" #include "utils/hashing.hh" #include "mutation_fragment_v2.hh" #include "mutation_consumer.hh" diff --git a/mutation_writer/multishard_writer.hh b/mutation_writer/multishard_writer.hh index 6d86ddf984..ebb43f3578 100644 --- a/mutation_writer/multishard_writer.hh +++ b/mutation_writer/multishard_writer.hh @@ -10,7 +10,7 @@ #include "schema/schema_fwd.hh" #include "readers/flat_mutation_reader_v2.hh" -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "utils/phased_barrier.hh" namespace mutation_writer { diff --git a/mutation_writer/shard_based_splitting_writer.cc b/mutation_writer/shard_based_splitting_writer.cc index 1c7a0a1b58..ba7bef39ce 100644 --- a/mutation_writer/shard_based_splitting_writer.cc +++ b/mutation_writer/shard_based_splitting_writer.cc @@ -12,6 +12,7 @@ #include #include #include +#include "dht/i_partitioner.hh" namespace mutation_writer { diff --git a/querier.cc b/querier.cc index ad6e23679f..dc60448fd2 100644 --- a/querier.cc +++ b/querier.cc @@ -9,7 +9,7 @@ #include #include "querier.hh" - +#include "dht/i_partitioner.hh" #include "reader_concurrency_semaphore.hh" #include "schema/schema.hh" #include "log.hh" diff --git a/query-request.hh b/query-request.hh index d4e008c50b..236b62c353 100644 --- a/query-request.hh +++ b/query-request.hh @@ -16,7 +16,7 @@ #include "db/functions/function.hh" #include "db/functions/aggregate_function.hh" #include "keys.hh" -#include "dht/i_partitioner.hh" +#include "dht/ring_position.hh" #include "enum_set.hh" #include "range.hh" #include "tracing/tracing.hh" diff --git a/query_ranges_to_vnodes.cc b/query_ranges_to_vnodes.cc index f35591ff55..8fd82713c8 100644 --- a/query_ranges_to_vnodes.cc +++ b/query_ranges_to_vnodes.cc @@ -7,6 +7,7 @@ */ #include "query_ranges_to_vnodes.hh" +#include "dht/i_partitioner.hh" static inline const dht::token& start_token(const dht::partition_range& r) { diff --git a/query_ranges_to_vnodes.hh b/query_ranges_to_vnodes.hh index 5e852230f1..2021b1378a 100644 --- a/query_ranges_to_vnodes.hh +++ b/query_ranges_to_vnodes.hh @@ -8,7 +8,7 @@ #pragma once -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "locator/token_metadata.hh" #include "locator/token_range_splitter.hh" #include "schema/schema.hh" diff --git a/readers/combined.hh b/readers/combined.hh index 50bfd32419..858d9f2840 100644 --- a/readers/combined.hh +++ b/readers/combined.hh @@ -8,7 +8,8 @@ #pragma once -#include "dht/i_partitioner.hh" +#include "schema/schema_fwd.hh" +#include "dht/ring_position.hh" #include "readers/flat_mutation_reader_fwd.hh" class reader_permit; diff --git a/readers/evictable.hh b/readers/evictable.hh index 474f02a9fa..19a97f5ed1 100644 --- a/readers/evictable.hh +++ b/readers/evictable.hh @@ -8,7 +8,7 @@ #pragma once -#include "dht/i_partitioner.hh" +#include "dht/i_partitioner_fwd.hh" #include "readers/flat_mutation_reader_fwd.hh" #include "schema/schema_fwd.hh" #include "seastarx.hh" @@ -20,6 +20,10 @@ namespace tracing { class trace_state_ptr; } +namespace query { +class partition_slice; +} + /// Make an auto-paused evictable reader. /// /// The reader is paused after each use, that is after each call to any of its diff --git a/readers/flat_mutation_reader_v2.hh b/readers/flat_mutation_reader_v2.hh index 62f8174df6..fc36c9eea6 100644 --- a/readers/flat_mutation_reader_v2.hh +++ b/readers/flat_mutation_reader_v2.hh @@ -12,11 +12,11 @@ #include #include -#include "dht/i_partitioner.hh" #include "mutation/mutation_fragment_v2.hh" #include "mutation/mutation.hh" #include "mutation/mutation_consumer_concepts.hh" #include "reader_permit.hh" +#include "utils/maybe_yield.hh" using seastar::future; diff --git a/readers/mutation_readers.cc b/readers/mutation_readers.cc index 5b265c70cb..2f3766e0d6 100644 --- a/readers/mutation_readers.cc +++ b/readers/mutation_readers.cc @@ -8,7 +8,6 @@ #include "clustering_key_filter.hh" #include "clustering_ranges_walker.hh" -#include "dht/i_partitioner.hh" #include "mutation/mutation.hh" #include "mutation/mutation_partition.hh" #include "mutation/mutation_compactor.hh" diff --git a/readers/mutation_source.hh b/readers/mutation_source.hh index 4be2f1bb9d..ce4385def0 100644 --- a/readers/mutation_source.hh +++ b/readers/mutation_source.hh @@ -8,7 +8,6 @@ #pragma once -#include "dht/i_partitioner.hh" #include "query-request.hh" #include "tracing/trace_state.hh" #include "readers/flat_mutation_reader_fwd.hh" diff --git a/schema/schema.cc b/schema/schema.cc index 09f439ab32..e8f629a86b 100644 --- a/schema/schema.cc +++ b/schema/schema.cc @@ -27,7 +27,6 @@ #include "view_info.hh" #include "partition_slice_builder.hh" #include "replica/database.hh" -#include "dht/i_partitioner.hh" #include "dht/token-sharding.hh" #include "cdc/cdc_extension.hh" #include "tombstone_gc_extension.hh" diff --git a/schema/schema_builder.hh b/schema/schema_builder.hh index 36ef96494b..3d58607b03 100644 --- a/schema/schema_builder.hh +++ b/schema/schema_builder.hh @@ -11,7 +11,6 @@ #include "schema.hh" #include "replica/database_fwd.hh" #include "cdc/log.hh" -#include "dht/i_partitioner.hh" #include "tombstone_gc_options.hh" namespace db { diff --git a/service/pager/paging_state.hh b/service/pager/paging_state.hh index 4b0ec703f7..ee9cf1c117 100644 --- a/service/pager/paging_state.hh +++ b/service/pager/paging_state.hh @@ -15,7 +15,6 @@ #include "bytes.hh" #include "keys.hh" #include "query-request.hh" -#include "dht/i_partitioner.hh" #include "db/read_repair_decision.hh" #include "mutation/position_in_partition.hh" #include "locator/host_id.hh" diff --git a/service/topology_state_machine.cc b/service/topology_state_machine.cc index 4ea9e63ee1..15cb5b774d 100644 --- a/service/topology_state_machine.cc +++ b/service/topology_state_machine.cc @@ -8,6 +8,7 @@ */ #include "topology_state_machine.hh" +#include "log.hh" #include diff --git a/service/topology_state_machine.hh b/service/topology_state_machine.hh index 1731414f33..730b560e60 100644 --- a/service/topology_state_machine.hh +++ b/service/topology_state_machine.hh @@ -21,7 +21,6 @@ #include "dht/token.hh" #include "raft/raft.hh" #include "utils/UUID.hh" -#include "dht/i_partitioner.hh" #include "mutation/canonical_mutation.hh" namespace service { diff --git a/sstables/index_entry.hh b/sstables/index_entry.hh index 75bd8e2d74..174166aa75 100644 --- a/sstables/index_entry.hh +++ b/sstables/index_entry.hh @@ -20,6 +20,7 @@ #include "utils/managed_ref.hh" #include "utils/managed_bytes.hh" #include "utils/managed_vector.hh" +#include "dht/i_partitioner.hh" #include diff --git a/sstables/key.hh b/sstables/key.hh index 19e64fc4c3..8a3a1afe1f 100644 --- a/sstables/key.hh +++ b/sstables/key.hh @@ -13,7 +13,7 @@ #include "replica/database_fwd.hh" #include "keys.hh" #include "compound_compat.hh" -#include "dht/i_partitioner.hh" +#include "dht/token.hh" namespace sstables { diff --git a/sstables/sstable_mutation_reader.hh b/sstables/sstable_mutation_reader.hh index 2a0948ac8c..582a89065c 100644 --- a/sstables/sstable_mutation_reader.hh +++ b/sstables/sstable_mutation_reader.hh @@ -12,14 +12,12 @@ #include "keys.hh" #include #include "unimplemented.hh" -#include "dht/i_partitioner.hh" #include #include "index_reader.hh" #include "counters.hh" #include "utils/data_input.hh" #include "clustering_ranges_walker.hh" #include "binary_search.hh" -#include "../dht/i_partitioner.hh" #include "sstables/mx/partition_reversing_data_source.hh" namespace sstables { diff --git a/sstables/sstable_set.hh b/sstables/sstable_set.hh index 9de9546066..de092835bc 100644 --- a/sstables/sstable_set.hh +++ b/sstables/sstable_set.hh @@ -13,7 +13,7 @@ #include "sstables/progress_monitor.hh" #include "sstables/types_fwd.hh" #include "shared_sstable.hh" -#include "dht/i_partitioner.hh" +#include "dht/ring_position.hh" #include #include #include diff --git a/sstables/writer.hh b/sstables/writer.hh index d5c57e8c3c..9af4a9a882 100644 --- a/sstables/writer.hh +++ b/sstables/writer.hh @@ -18,6 +18,7 @@ #include "version.hh" #include "counters.hh" #include "utils/bit_cast.hh" +#include "dht/i_partitioner_fwd.hh" namespace db { diff --git a/streaming/stream_detail.hh b/streaming/stream_detail.hh index 2ea6e66590..f0a4448665 100644 --- a/streaming/stream_detail.hh +++ b/streaming/stream_detail.hh @@ -14,7 +14,6 @@ #include "schema/schema_fwd.hh" #include #include "range.hh" -#include "dht/i_partitioner.hh" namespace streaming { diff --git a/streaming/stream_manager.hh b/streaming/stream_manager.hh index 8a25b48ddb..5043013032 100644 --- a/streaming/stream_manager.hh +++ b/streaming/stream_manager.hh @@ -44,6 +44,10 @@ namespace gms { class gossiper; } +namespace replica { +class database; +} + namespace streaming { struct stream_bytes { diff --git a/streaming/stream_plan.hh b/streaming/stream_plan.hh index cd31a98f86..2df1e4ed17 100644 --- a/streaming/stream_plan.hh +++ b/streaming/stream_plan.hh @@ -14,7 +14,6 @@ #include #include "gms/inet_address.hh" #include "query-request.hh" -#include "dht/i_partitioner.hh" #include "streaming/stream_fwd.hh" #include "streaming/stream_coordinator.hh" #include "streaming/stream_detail.hh" diff --git a/streaming/stream_request.hh b/streaming/stream_request.hh index 5ea9a923e9..9cd1ae006a 100644 --- a/streaming/stream_request.hh +++ b/streaming/stream_request.hh @@ -12,7 +12,6 @@ #include #include "range.hh" -#include "dht/i_partitioner.hh" #include "partition_range_compat.hh" #include diff --git a/streaming/stream_session.hh b/streaming/stream_session.hh index 4413e6fec6..d877d29e3e 100644 --- a/streaming/stream_session.hh +++ b/streaming/stream_session.hh @@ -23,7 +23,6 @@ #include "streaming/stream_reason.hh" #include "streaming/session_info.hh" #include "query-request.hh" -#include "dht/i_partitioner.hh" #include #include #include diff --git a/test/lib/key_utils.cc b/test/lib/key_utils.cc index 169614e8de..d8e8482f26 100644 --- a/test/lib/key_utils.cc +++ b/test/lib/key_utils.cc @@ -10,6 +10,7 @@ #include "test/lib/random_schema.hh" #include "test/lib/random_utils.hh" #include "test/lib/test_utils.hh" +#include "dht/i_partitioner.hh" namespace tests { diff --git a/test/lib/key_utils.hh b/test/lib/key_utils.hh index b2ec6979f4..9417575991 100644 --- a/test/lib/key_utils.hh +++ b/test/lib/key_utils.hh @@ -8,7 +8,10 @@ #pragma once -#include "dht/i_partitioner.hh" +#include + +#include "dht/decorated_key.hh" +#include "seastarx.hh" struct local_shard_only_tag { }; using local_shard_only = bool_class; diff --git a/test/lib/mutation_assertions.hh b/test/lib/mutation_assertions.hh index 7b4ffee105..be4d1242b2 100644 --- a/test/lib/mutation_assertions.hh +++ b/test/lib/mutation_assertions.hh @@ -15,6 +15,7 @@ #include "log.hh" #include "clustering_interval_set.hh" #include "mutation/mutation_partition_v2.hh" +#include "dht/i_partitioner.hh" extern logging::logger testlog; diff --git a/test/lib/random_schema.hh b/test/lib/random_schema.hh index 25bfcf582c..37c3ed5785 100644 --- a/test/lib/random_schema.hh +++ b/test/lib/random_schema.hh @@ -9,7 +9,6 @@ #pragma once #include "schema/schema.hh" -#include "dht/i_partitioner.hh" #include "test/lib/data_model.hh" /// diff --git a/test/lib/sstable_utils.hh b/test/lib/sstable_utils.hh index 06c7baade5..946d3cce9f 100644 --- a/test/lib/sstable_utils.hh +++ b/test/lib/sstable_utils.hh @@ -17,7 +17,6 @@ #include "sstables/writer.hh" #include "compaction/compaction_manager.hh" #include "replica/memtable-sstable.hh" -#include "dht/i_partitioner.hh" #include "test/lib/test_services.hh" #include "test/lib/sstable_test_env.hh" #include "test/lib/reader_concurrency_semaphore.hh" diff --git a/test/manual/row_locker_test.cc b/test/manual/row_locker_test.cc index fabb0f7292..b6582fab07 100644 --- a/test/manual/row_locker_test.cc +++ b/test/manual/row_locker_test.cc @@ -12,6 +12,7 @@ #include "db/view/row_locking.hh" #include "schema/schema_builder.hh" +#include "dht/i_partitioner.hh" static row_locker::stats row_locker_stats; diff --git a/test/perf/perf_row_cache_update.cc b/test/perf/perf_row_cache_update.cc index ddae255eaf..97d8587cbf 100644 --- a/test/perf/perf_row_cache_update.cc +++ b/test/perf/perf_row_cache_update.cc @@ -21,6 +21,7 @@ #include "readers/combined.hh" #include "readers/mutation_fragment_v1_stream.hh" #include "replica/memtable.hh" +#include "dht/i_partitioner.hh" #include "test/perf/perf.hh" #include "test/lib/reader_concurrency_semaphore.hh" diff --git a/test/unit/row_cache_alloc_stress_test.cc b/test/unit/row_cache_alloc_stress_test.cc index cf599b8804..f0d3b0d239 100644 --- a/test/unit/row_cache_alloc_stress_test.cc +++ b/test/unit/row_cache_alloc_stress_test.cc @@ -19,6 +19,7 @@ #include "schema/schema_builder.hh" #include "replica/memtable.hh" #include "test/lib/reader_concurrency_semaphore.hh" +#include "dht/i_partitioner.hh" static partition_key new_key(schema_ptr s) { diff --git a/tools/lua_sstable_consumer.cc b/tools/lua_sstable_consumer.cc index 21e6e480d0..1ce1036795 100644 --- a/tools/lua_sstable_consumer.cc +++ b/tools/lua_sstable_consumer.cc @@ -22,6 +22,7 @@ #include "tools/lua_sstable_consumer.hh" #include "types/collection.hh" #include "types/tuple.hh" +#include "dht/i_partitioner.hh" namespace { diff --git a/tools/scylla-types.cc b/tools/scylla-types.cc index 48cab774dc..8e5d0d4251 100644 --- a/tools/scylla-types.cc +++ b/tools/scylla-types.cc @@ -15,6 +15,7 @@ #include "log.hh" #include "schema/schema_builder.hh" #include "tools/utils.hh" +#include "dht/i_partitioner.hh" using namespace seastar; using namespace tools::utils; diff --git a/view_info.hh b/view_info.hh index 2c24add3f0..a65de86845 100644 --- a/view_info.hh +++ b/view_info.hh @@ -8,7 +8,6 @@ #pragma once -#include "dht/i_partitioner.hh" #include "query-request.hh" #include "schema/schema_fwd.hh" #include "db/view/view.hh"