diff --git a/sstables/kl/reader.cc b/sstables/kl/reader.cc index 519d8101c7..d35ad2d32a 100644 --- a/sstables/kl/reader.cc +++ b/sstables/kl/reader.cc @@ -1349,7 +1349,7 @@ private: sstable::disk_read_range drr{begin, *end}; auto last_end = _fwd_mr ? _sst->data_size() : drr.end; _read_enabled = bool(drr); - _context = data_consume_rows(*_schema, _sst, _consumer, std::move(drr), last_end, sstable::integrity_check::no); + _context = data_consume_rows(*_schema, _sst, _consumer, std::move(drr), last_end, integrity_check::no); } _monitor.on_read_started(_context->reader_position()); @@ -1551,7 +1551,7 @@ public: reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& mon, - sstable::integrity_check integrity) + integrity_check integrity) : mp_row_consumer_reader_k_l(std::move(schema), permit, std::move(sst)) , _consumer(this, _schema, std::move(permit), _schema->full_slice(), std::move(trace_state), streamed_mutation::forwarding::no, _sst) , _context(data_consume_rows(*_schema, _sst, _consumer, integrity)) @@ -1598,7 +1598,7 @@ mutation_reader make_full_scan_reader( reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& monitor, - sstable::integrity_check integrity) { + integrity_check integrity) { return make_mutation_reader(std::move(sstable), std::move(schema), std::move(permit), std::move(trace_state), monitor, integrity); } diff --git a/sstables/kl/reader.hh b/sstables/kl/reader.hh index a56571cba2..b70ac200f3 100644 --- a/sstables/kl/reader.hh +++ b/sstables/kl/reader.hh @@ -11,7 +11,7 @@ #include "readers/mutation_reader_fwd.hh" #include "readers/mutation_reader.hh" #include "sstables/progress_monitor.hh" -#include "sstables/sstables.hh" +#include "sstables/types_fwd.hh" namespace sstables { namespace kl { @@ -47,7 +47,7 @@ mutation_reader make_full_scan_reader( reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& monitor, - sstable::integrity_check integrity); + integrity_check integrity); } // namespace kl } // namespace sstables diff --git a/sstables/mx/reader.cc b/sstables/mx/reader.cc index c32eced1f5..35dc2d71b8 100644 --- a/sstables/mx/reader.cc +++ b/sstables/mx/reader.cc @@ -1557,7 +1557,7 @@ private: sstable::disk_read_range drr{begin, *end}; auto last_end = _fwd_mr ? _sst->data_size() : drr.end; _read_enabled = bool(drr); - _context = data_consume_rows(*_schema, _sst, _consumer, std::move(drr), last_end, sstable::integrity_check::no); + _context = data_consume_rows(*_schema, _sst, _consumer, std::move(drr), last_end, integrity_check::no); } _monitor.on_read_started(_context->reader_position()); @@ -1773,7 +1773,7 @@ public: reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& mon, - sstable::integrity_check integrity) + integrity_check integrity) : mp_row_consumer_reader_mx(std::move(schema), permit, std::move(sst)) , _consumer(this, _schema, std::move(permit), _schema->full_slice(), std::move(trace_state), streamed_mutation::forwarding::no, _sst) , _context(data_consume_rows(*_schema, _sst, _consumer, integrity)) @@ -1818,7 +1818,7 @@ mutation_reader make_full_scan_reader( reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& monitor, - sstable::integrity_check integrity) { + integrity_check integrity) { return make_mutation_reader(std::move(sstable), std::move(schema), std::move(permit), std::move(trace_state), monitor, integrity); } @@ -2066,7 +2066,7 @@ future validate( sstables::read_monitor& monitor) { auto schema = sstable->get_schema(); validating_consumer consumer(schema, permit, sstable, std::move(error_handler)); - auto context = data_consume_rows>(*schema, sstable, consumer, sstable::integrity_check::yes); + auto context = data_consume_rows>(*schema, sstable, consumer, integrity_check::yes); std::optional idx_reader; idx_reader.emplace(sstable, permit, tracing::trace_state_ptr{}, sstables::use_caching::no, false); diff --git a/sstables/mx/reader.hh b/sstables/mx/reader.hh index 997eb19ad9..0f5e7ae57a 100644 --- a/sstables/mx/reader.hh +++ b/sstables/mx/reader.hh @@ -11,7 +11,7 @@ #include "readers/mutation_reader_fwd.hh" #include "readers/mutation_reader.hh" #include "sstables/progress_monitor.hh" -#include "sstables/sstables.hh" +#include "sstables/types_fwd.hh" namespace sstables { namespace mx { @@ -50,7 +50,7 @@ mutation_reader make_full_scan_reader( reader_permit permit, tracing::trace_state_ptr trace_state, read_monitor& monitor, - sstable::integrity_check integrity); + integrity_check integrity); // Validate the content of the sstable with the mutation_fragment_stream_valdiator, // additionally cross checking that the content is laid out as expected by the diff --git a/sstables/sstable_mutation_reader.hh b/sstables/sstable_mutation_reader.hh index 401f49dfa1..b4ea5b5e50 100644 --- a/sstables/sstable_mutation_reader.hh +++ b/sstables/sstable_mutation_reader.hh @@ -110,7 +110,7 @@ position_in_partition_view get_slice_lower_bound(const schema& s, const query::p // heuristics which learn from the usefulness of previous read aheads. template inline std::unique_ptr data_consume_rows(const schema& s, shared_sstable sst, typename DataConsumeRowsContext::consumer& consumer, - sstable::disk_read_range toread, uint64_t last_end, sstable::integrity_check integrity) { + sstable::disk_read_range toread, uint64_t last_end, integrity_check integrity) { // Although we were only asked to read until toread.end, we'll not limit // the underlying file input stream to this end, but rather to last_end. // This potentially enables read-ahead beyond end, until last_end, which @@ -158,7 +158,7 @@ inline std::unique_ptr data_consume_single_partition(con // Like data_consume_rows() with bounds, but iterates over whole range template inline std::unique_ptr data_consume_rows(const schema& s, shared_sstable sst, typename DataConsumeRowsContext::consumer& consumer, - sstable::integrity_check integrity) { + integrity_check integrity) { auto data_size = sst->data_size(); return data_consume_rows(s, std::move(sst), consumer, {0, data_size}, data_size, integrity); } diff --git a/sstables/sstables.hh b/sstables/sstables.hh index 366b190800..30e2751664 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -186,7 +186,6 @@ public: using format_types = sstable_format_types; using manager_list_link_type = bi::list_member_hook>; using manager_set_link_type = bi::set_member_hook>; - using integrity_check = bool_class; public: sstable(schema_ptr schema, const data_dictionary::storage_options& storage, @@ -1011,13 +1010,13 @@ public: friend class sstables_manager; template friend std::unique_ptr - data_consume_rows(const schema&, shared_sstable, typename DataConsumeRowsContext::consumer&, disk_read_range, uint64_t, sstable::integrity_check); + data_consume_rows(const schema&, shared_sstable, typename DataConsumeRowsContext::consumer&, disk_read_range, uint64_t, integrity_check); template friend std::unique_ptr data_consume_single_partition(const schema&, shared_sstable, typename DataConsumeRowsContext::consumer&, disk_read_range); template friend std::unique_ptr - data_consume_rows(const schema&, shared_sstable, typename DataConsumeRowsContext::consumer&, sstable::integrity_check); + data_consume_rows(const schema&, shared_sstable, typename DataConsumeRowsContext::consumer&, integrity_check); friend void lw_shared_ptr_deleter::dispose(sstable* s); gc_clock::time_point get_gc_before_for_drop_estimation(const gc_clock::time_point& compaction_time, const tombstone_gc_state& gc_state, const schema_ptr& s) const; gc_clock::time_point get_gc_before_for_fully_expire(const gc_clock::time_point& compaction_time, const tombstone_gc_state& gc_state, const schema_ptr& s) const; diff --git a/sstables/types_fwd.hh b/sstables/types_fwd.hh index 0fde7b942d..48aa8d342b 100644 --- a/sstables/types_fwd.hh +++ b/sstables/types_fwd.hh @@ -8,10 +8,13 @@ #pragma once +#include + #include "utils/UUID.hh" namespace sstables { using run_id = utils::tagged_uuid; +using integrity_check = bool_class; } // namespace sstables