Skip to content

Commit

Permalink
Try using PrefetchInternal instead of regular Prefetch
Browse files Browse the repository at this point in the history
  • Loading branch information
archang19 committed Dec 9, 2024
1 parent 4ea26bd commit c066bc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion file/file_prefetch_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ Status FilePrefetchBuffer::Prefetch(const IOOptions& opts,
if (usage_ == FilePrefetchBufferUsage::kTableOpenPrefetchTail && s.ok()) {
RecordInHistogram(stats_, TABLE_OPEN_PREFETCH_TAIL_READ_BYTES, read_len);
}
assert(buf->offset_ <= offset);
return s;
}

Expand Down Expand Up @@ -819,7 +820,8 @@ bool FilePrefetchBuffer::TryReadFromCacheUntracked(
assert(max_readahead_size_ >= readahead_size_);

if (for_compaction) {
s = Prefetch(opts, reader, offset, std::max(n, readahead_size_));
s = PrefetchInternal(opts, reader, offset, std::max(n, readahead_size_),
0, copy_to_overlap_buffer);
} else {
if (implicit_auto_readahead_) {
if (!IsEligibleForPrefetch(offset, n)) {
Expand Down

0 comments on commit c066bc6

Please sign in to comment.