mirror of https://github.com/facebook/rocksdb.git
5cb2d09d47
Summary: Summary - Refactor FilePrefetchBuffer code - Implementation: FilePrefetchBuffer maintains a deque of free buffers (free_bufs_) of size num_buffers_ and buffers (bufs_) which contains the prefetched data. Whenever a buffer is consumed or is outdated (w.r.t. to requested offset), that buffer is cleared and returned to free_bufs_. If a buffer is available in free_bufs_, it's moved to bufs_ and is sent for prefetching. num_buffers_ defines how many buffers are maintained that contains prefetched data. If num_buffers_ == 1, it's a sequential read flow. Read API will be called on that one buffer whenever the data is requested and is not in the buffer. If num_buffers_ > 1, then the data is prefetched asynchronosuly in the buffers whenever the data is consumed from the buffers and that buffer is freed. If num_buffers > 1, then requested data can be overlapping between 2 buffers. To return the continuous buffer overlap_bufs_ is used. The requested data is copied from 2 buffers to the overlap_bufs_ and overlap_bufs_ is returned to the caller. - Merged Sync and Async code flow into one in FilePrefetchBuffer. Test Plan - - Crash test passed - Unit tests - Pending - Benchmarks Pull Request resolved: https://github.com/facebook/rocksdb/pull/12097 Reviewed By: ajkr Differential Revision: D51759552 Pulled By: akankshamahajan15 fbshipit-source-id: 69a352945affac2ed22be96048d55863e0168ad5 |
||
---|---|---|
.. | ||
delete_scheduler.cc | ||
delete_scheduler.h | ||
delete_scheduler_test.cc | ||
file_prefetch_buffer.cc | ||
file_prefetch_buffer.h | ||
file_util.cc | ||
file_util.h | ||
filename.cc | ||
filename.h | ||
line_file_reader.cc | ||
line_file_reader.h | ||
prefetch_test.cc | ||
random_access_file_reader.cc | ||
random_access_file_reader.h | ||
random_access_file_reader_test.cc | ||
read_write_util.cc | ||
read_write_util.h | ||
readahead_file_info.h | ||
readahead_raf.cc | ||
readahead_raf.h | ||
sequence_file_reader.cc | ||
sequence_file_reader.h | ||
sst_file_manager_impl.cc | ||
sst_file_manager_impl.h | ||
writable_file_writer.cc | ||
writable_file_writer.h |