From 14a4173f50e76923cfa1b08e49903c5491be0d9f Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 20 Apr 2021 21:14:56 +0300 Subject: [PATCH] treewide: make headers self-sufficient In preparation for some large header changes, fix up any headers that aren't self-sufficient by adding needed includes or forward declarations. --- cdc/generation_service.hh | 10 ++++++++++ cdc/split.hh | 1 + db/view/view_update_checks.hh | 4 ++++ raft/logical_clock.hh | 1 + sstables/kl/writer.hh | 1 + sstables/scanning_clustered_index_cursor.hh | 3 +++ test/lib/index_reader_assertions.hh | 1 + test/lib/reader_lifecycle_policy.hh | 1 + test/lib/select_statement_utils.hh | 1 + test/unit/bptree_validation.hh | 3 +++ test/unit/btree_validation.hh | 3 +++ test/unit/collection_stress.hh | 1 + test/unit/radix_tree_printer.hh | 1 + test/unit/tree_test_key.hh | 4 ++++ types/listlike_partial_deserializing_iterator.hh | 1 + utils/compact-radix-tree.hh | 1 + utils/fragment_range.hh | 1 + utils/histogram_metrics_helper.hh | 1 + 18 files changed, 39 insertions(+) diff --git a/cdc/generation_service.hh b/cdc/generation_service.hh index 1063ab05fb..1fcdeb302c 100644 --- a/cdc/generation_service.hh +++ b/cdc/generation_service.hh @@ -22,18 +22,28 @@ #pragma once +#include #include "cdc/metadata.hh" #include "cdc/generation_id.hh" #include "gms/i_endpoint_state_change_subscriber.hh" namespace db { class system_distributed_keyspace; +class config; } namespace gms { class gossiper; } +namespace seastar { +class abort_source; +} + +namespace locator { +class shared_token_metadata; +} + namespace cdc { class generation_service : public peering_sharded_service diff --git a/cdc/split.hh b/cdc/split.hh index 4647b52a23..01b06d8818 100644 --- a/cdc/split.hh +++ b/cdc/split.hh @@ -24,6 +24,7 @@ #include #include #include "schema_fwd.hh" +#include "database_fwd.hh" #include "timestamp.hh" #include "bytes.hh" #include diff --git a/db/view/view_update_checks.hh b/db/view/view_update_checks.hh index f77b951954..cc77d76d04 100644 --- a/db/view/view_update_checks.hh +++ b/db/view/view_update_checks.hh @@ -21,9 +21,13 @@ #pragma once +#include #include "streaming/stream_reason.hh" #include #include +#include "seastarx.hh" + +class table; namespace db { diff --git a/raft/logical_clock.hh b/raft/logical_clock.hh index 2a6fc79a46..15cfcef05f 100644 --- a/raft/logical_clock.hh +++ b/raft/logical_clock.hh @@ -21,6 +21,7 @@ #pragma once #include +#include namespace raft { diff --git a/sstables/kl/writer.hh b/sstables/kl/writer.hh index 04cec2ca65..3290ff4b2f 100644 --- a/sstables/kl/writer.hh +++ b/sstables/kl/writer.hh @@ -20,6 +20,7 @@ */ #include "sstables/writer_impl.hh" +#include "sstables/writer.hh" namespace sstables { diff --git a/sstables/scanning_clustered_index_cursor.hh b/sstables/scanning_clustered_index_cursor.hh index 51dd9d3e44..1592f59e20 100644 --- a/sstables/scanning_clustered_index_cursor.hh +++ b/sstables/scanning_clustered_index_cursor.hh @@ -24,9 +24,12 @@ #include "sstables/index_entry.hh" #include "sstables/promoted_index_blocks_reader.hh" #include "schema.hh" +#include "log.hh" namespace sstables { +extern logging::logger sstlog; + // Cursor implementation which incrementally consumes promoted index entries // from an input stream. // diff --git a/test/lib/index_reader_assertions.hh b/test/lib/index_reader_assertions.hh index 1234b93d7f..d9fcd70596 100644 --- a/test/lib/index_reader_assertions.hh +++ b/test/lib/index_reader_assertions.hh @@ -26,6 +26,7 @@ #include "dht/i_partitioner.hh" #include "schema.hh" #include "sstables/index_reader.hh" +#include "reader_permit.hh" class index_reader_assertions { std::unique_ptr _r; diff --git a/test/lib/reader_lifecycle_policy.hh b/test/lib/reader_lifecycle_policy.hh index 176474278b..ac2250cd29 100644 --- a/test/lib/reader_lifecycle_policy.hh +++ b/test/lib/reader_lifecycle_policy.hh @@ -22,6 +22,7 @@ #pragma once #include "mutation_reader.hh" +#include class test_reader_lifecycle_policy : public reader_lifecycle_policy diff --git a/test/lib/select_statement_utils.hh b/test/lib/select_statement_utils.hh index ea3305fee8..6e6ec8e80e 100644 --- a/test/lib/select_statement_utils.hh +++ b/test/lib/select_statement_utils.hh @@ -22,6 +22,7 @@ #pragma once #include +#include "seastarx.hh" namespace cql3 { diff --git a/test/unit/bptree_validation.hh b/test/unit/bptree_validation.hh index 766b88c8ff..4bb758e6d2 100644 --- a/test/unit/bptree_validation.hh +++ b/test/unit/bptree_validation.hh @@ -21,6 +21,9 @@ #pragma once +#include +#include "utils/bptree.hh" + namespace bplus { template diff --git a/test/unit/btree_validation.hh b/test/unit/btree_validation.hh index 5ac652c6a5..07eaf8c9f7 100644 --- a/test/unit/btree_validation.hh +++ b/test/unit/btree_validation.hh @@ -21,6 +21,9 @@ #pragma once +#include +#include "utils/intrusive_btree.hh" + namespace intrusive_b { class member_hook; diff --git a/test/unit/collection_stress.hh b/test/unit/collection_stress.hh index dc9ca1fc8d..5012b73421 100644 --- a/test/unit/collection_stress.hh +++ b/test/unit/collection_stress.hh @@ -24,6 +24,7 @@ #include #include #include +#include #include "utils/logalloc.hh" struct stress_config { diff --git a/test/unit/radix_tree_printer.hh b/test/unit/radix_tree_printer.hh index 8addbc443a..81178caecd 100644 --- a/test/unit/radix_tree_printer.hh +++ b/test/unit/radix_tree_printer.hh @@ -22,6 +22,7 @@ #pragma once #include +#include "utils/compact-radix-tree.hh" namespace compact_radix_tree { diff --git a/test/unit/tree_test_key.hh b/test/unit/tree_test_key.hh index b8b400bf64..eec0120626 100644 --- a/test/unit/tree_test_key.hh +++ b/test/unit/tree_test_key.hh @@ -21,6 +21,10 @@ #pragma once +#include +#include +#include "utils/bptree.hh" + /* * Helper class that helps to check that tree * - works with keys without default contstuctor diff --git a/types/listlike_partial_deserializing_iterator.hh b/types/listlike_partial_deserializing_iterator.hh index c116dc5b2e..c7ec4e782a 100644 --- a/types/listlike_partial_deserializing_iterator.hh +++ b/types/listlike_partial_deserializing_iterator.hh @@ -25,6 +25,7 @@ #include "cql_serialization_format.hh" #include "utils/fragment_range.hh" #include "utils/managed_bytes.hh" +#include "types.hh" int read_collection_size(bytes_view& in, cql_serialization_format sf); bytes_view read_collection_value(bytes_view& in, cql_serialization_format sf); diff --git a/utils/compact-radix-tree.hh b/utils/compact-radix-tree.hh index adff5560aa..d66ee50688 100644 --- a/utils/compact-radix-tree.hh +++ b/utils/compact-radix-tree.hh @@ -27,6 +27,7 @@ #include #include "utils/allocation_strategy.hh" #include "utils/array-search.hh" +#include class size_calculator; diff --git a/utils/fragment_range.hh b/utils/fragment_range.hh index 3c752a7781..cbf19a3d08 100644 --- a/utils/fragment_range.hh +++ b/utils/fragment_range.hh @@ -26,6 +26,7 @@ #include #include #include +#include #include "marshal_exception.hh" #include "bytes.hh" diff --git a/utils/histogram_metrics_helper.hh b/utils/histogram_metrics_helper.hh index b807e61964..03839a48af 100644 --- a/utils/histogram_metrics_helper.hh +++ b/utils/histogram_metrics_helper.hh @@ -23,6 +23,7 @@ #pragma once +#include #include #include "seastarx.hh" #include "estimated_histogram.hh"