Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate ReadOptions::readahead_size in PartitionedIndexReader #12763

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions file/prefetch_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2722,11 +2722,7 @@ TEST_P(PrefetchTest, SeekParallelizationTestWithPosix) {
if (read_async_called) {
ASSERT_GT(async_read_bytes.count, 0);
ASSERT_GT(get_perf_context()->number_async_seek, 0);
if (std::get<1>(GetParam())) {
ASSERT_EQ(buff_prefetch_count, 1);
} else {
ASSERT_EQ(buff_prefetch_count, 2);
}
ASSERT_EQ(buff_prefetch_count, 2);
} else {
// Not all platforms support iouring. In that case, ReadAsync in posix
// won't submit async requests.
Expand Down
7 changes: 1 addition & 6 deletions table/block_based/partitioned_index_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ InternalIteratorBase<IndexValue>* PartitionIndexReader::NewIterator(
index_value_is_full(), false /* block_contents_pinned */,
user_defined_timestamps_persisted()));
} else {
ReadOptions ro{read_options};
// FIXME? Possible regression seen in prefetch_test if this field is
// propagated
ro.readahead_size = ReadOptions{}.readahead_size;

// We don't return pinned data from index blocks, so no need
// to set `block_contents_pinned`.
std::unique_ptr<InternalIteratorBase<IndexValue>> index_iter(
Expand All @@ -94,7 +89,7 @@ InternalIteratorBase<IndexValue>* PartitionIndexReader::NewIterator(
user_defined_timestamps_persisted()));

it = new PartitionedIndexIterator(
table(), ro, *internal_comparator(), std::move(index_iter),
table(), read_options, *internal_comparator(), std::move(index_iter),
lookup_context ? lookup_context->caller
: TableReaderCaller::kUncategorized);
}
Expand Down
Loading