index_reader: Use _pc field in get_file_input_stream_options() directly

No need to pass this-> field into this-> call

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2023-05-18 15:59:46 +03:00
parent 21d24e8ea3
commit 3fd5d3cc2b

View File

@@ -439,7 +439,7 @@ class index_reader {
std::unique_ptr<index_consume_entry_context<index_consumer>> make_context(uint64_t begin, uint64_t end, index_consumer& consumer) {
auto index_file = make_tracked_index_file(*_sstable, _permit, _trace_state, _use_caching);
auto input = make_file_input_stream(index_file, begin, (_single_page_read ? end : _sstable->index_size()) - begin,
get_file_input_stream_options(_pc));
get_file_input_stream_options());
auto trust_pi = trust_promoted_index(_sstable->has_correct_promoted_index_entries());
auto ck_values_fixed_lengths = _sstable->get_version() >= sstable_version_types::mc
? std::make_optional(get_clustering_values_fixed_lengths(_sstable->get_serialization_header()))
@@ -753,11 +753,11 @@ private:
});
}
file_input_stream_options get_file_input_stream_options(const io_priority_class& pc) {
file_input_stream_options get_file_input_stream_options() {
file_input_stream_options options;
options.buffer_size = _sstable->sstable_buffer_size;
options.read_ahead = 2;
options.io_priority_class = pc;
options.io_priority_class = _pc;
options.dynamic_adjustments = _sstable->_index_history;
return options;
}
@@ -821,7 +821,7 @@ public:
promoted_index* pi = e.get_promoted_index().get();
if (pi) {
bound.clustered_cursor = pi->make_cursor(_sstable, _permit, _trace_state,
get_file_input_stream_options(_pc), _use_caching);
get_file_input_stream_options(), _use_caching);
}
});
if (!bound.clustered_cursor) {