mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Fix typo: replace readadhead with readahead (#7953)
Summary: This PR replaces several "readadhead" typos with "readahead". Pull Request resolved: https://github.com/facebook/rocksdb/pull/7953 Reviewed By: ajkr Differential Revision: D26518903 Pulled By: jay-zhuang fbshipit-source-id: 6f7dece0e39ec4f71c4a936399bcb2e02574f42a
This commit is contained in:
parent
8a05c21e32
commit
0c2d71edba
|
@ -119,7 +119,7 @@ bool FilePrefetchBuffer::TryReadFromCache(const IOOptions& opts,
|
|||
}
|
||||
|
||||
// If the buffer contains only a few of the requested bytes:
|
||||
// If readahead is enabled: prefetch the remaining bytes + readadhead bytes
|
||||
// If readahead is enabled: prefetch the remaining bytes + readahead bytes
|
||||
// and satisfy the request.
|
||||
// If readahead is not enabled: return false.
|
||||
if (offset + n > buffer_offset_ + buffer_.CurrentSize()) {
|
||||
|
|
|
@ -41,16 +41,16 @@ class FilePrefetchBuffer {
|
|||
//
|
||||
// Automatic readhead is enabled for a file if file_reader, readahead_size,
|
||||
// and max_readahead_size are passed in.
|
||||
// If file_reader is a nullptr, setting readadhead_size and max_readahead_size
|
||||
// If file_reader is a nullptr, setting readahead_size and max_readahead_size
|
||||
// does not make any sense. So it does nothing.
|
||||
// A user can construct a FilePrefetchBuffer without any arguments, but use
|
||||
// `Prefetch` to load data into the buffer.
|
||||
FilePrefetchBuffer(RandomAccessFileReader* file_reader = nullptr,
|
||||
size_t readadhead_size = 0, size_t max_readahead_size = 0,
|
||||
size_t readahead_size = 0, size_t max_readahead_size = 0,
|
||||
bool enable = true, bool track_min_offset = false)
|
||||
: buffer_offset_(0),
|
||||
file_reader_(file_reader),
|
||||
readahead_size_(readadhead_size),
|
||||
readahead_size_(readahead_size),
|
||||
max_readahead_size_(max_readahead_size),
|
||||
min_offset_read_(port::kMaxSizet),
|
||||
enable_(enable),
|
||||
|
@ -67,7 +67,7 @@ class FilePrefetchBuffer {
|
|||
// Tries returning the data for a file raed from this buffer, if that data is
|
||||
// in the buffer.
|
||||
// It handles tracking the minimum read offset if track_min_offset = true.
|
||||
// It also does the exponential readahead when readadhead_size is set as part
|
||||
// It also does the exponential readahead when readahead_size is set as part
|
||||
// of the constructor.
|
||||
//
|
||||
// offset : the file offset.
|
||||
|
|
|
@ -195,7 +195,7 @@ IOStatus GenerateOneFileChecksum(
|
|||
: default_max_read_ahead_size;
|
||||
|
||||
FilePrefetchBuffer prefetch_buffer(
|
||||
reader.get(), readahead_size /* readadhead_size */,
|
||||
reader.get(), readahead_size /* readahead_size */,
|
||||
readahead_size /* max_readahead_size */, !allow_mmap_reads /* enable */);
|
||||
|
||||
Slice slice;
|
||||
|
|
|
@ -2925,7 +2925,7 @@ Status BlockBasedTable::VerifyChecksumInBlocks(
|
|||
// FilePrefetchBuffer doesn't work in mmap mode and readahead is not
|
||||
// needed there.
|
||||
FilePrefetchBuffer prefetch_buffer(
|
||||
rep_->file.get(), readahead_size /* readadhead_size */,
|
||||
rep_->file.get(), readahead_size /* readahead_size */,
|
||||
readahead_size /* max_readahead_size */,
|
||||
!rep_->ioptions.allow_mmap_reads /* enable */);
|
||||
|
||||
|
|
Loading…
Reference in a new issue