The flat_mutation_reader files were conflated and contained multiple readers, which were not strictly necessary. Splitting optimizes both iterative compilation times, as touching rarely used readers doesn't recompile large chunks of codebase. Total compilation times are also improved, as the size of flat_mutation_reader.hh and flat_mutation_reader_v2.hh have been reduced and those files are included by many file in the codebase. With changes real 29m14.051s user 168m39.071s sys 5m13.443s Without changes real 30m36.203s user 175m43.354s sys 5m26.376s Closes #10194
61 lines
1.9 KiB
C++
61 lines
1.9 KiB
C++
/*
|
|
* Copyright (C) 2021-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "readers/flat_mutation_reader_v2.hh"
|
|
#include "readers/flat_mutation_reader.hh"
|
|
#include "sstables/progress_monitor.hh"
|
|
#include <seastar/core/io_priority_class.hh>
|
|
|
|
namespace sstables {
|
|
namespace mx {
|
|
|
|
// Precondition: if the slice is reversed, the schema must be reversed as well
|
|
// and the range must be singular (`range.is_singular()`).
|
|
// Reversed slices must be provided in the 'half-reversed' format (the order of ranges
|
|
// being reversed, but the ranges themselves are not).
|
|
// Fast-forwarding is not supported in reversed queries (FIXME).
|
|
flat_mutation_reader_v2 make_reader(
|
|
shared_sstable sstable,
|
|
schema_ptr schema,
|
|
reader_permit permit,
|
|
const dht::partition_range& range,
|
|
const query::partition_slice& slice,
|
|
const io_priority_class& pc,
|
|
tracing::trace_state_ptr trace_state,
|
|
streamed_mutation::forwarding fwd,
|
|
mutation_reader::forwarding fwd_mr,
|
|
read_monitor& monitor);
|
|
|
|
// Same as above but the slice is moved and stored inside the reader.
|
|
flat_mutation_reader_v2 make_reader(
|
|
shared_sstable sstable,
|
|
schema_ptr schema,
|
|
reader_permit permit,
|
|
const dht::partition_range& range,
|
|
query::partition_slice&& slice,
|
|
const io_priority_class& pc,
|
|
tracing::trace_state_ptr trace_state,
|
|
streamed_mutation::forwarding fwd,
|
|
mutation_reader::forwarding fwd_mr,
|
|
read_monitor& monitor);
|
|
|
|
// A reader which doesn't use the index at all. It reads everything from the
|
|
// sstable and it doesn't support skipping.
|
|
flat_mutation_reader_v2 make_crawling_reader(
|
|
shared_sstable sstable,
|
|
schema_ptr schema,
|
|
reader_permit permit,
|
|
const io_priority_class& pc,
|
|
tracing::trace_state_ptr trace_state,
|
|
read_monitor& monitor);
|
|
|
|
} // namespace mx
|
|
} // namespace sstables
|