mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 16:30:56 +00:00
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 |
||
---|---|---|
.. | ||
blob_constants.h | ||
blob_contents.cc | ||
blob_contents.h | ||
blob_counting_iterator.h | ||
blob_counting_iterator_test.cc | ||
blob_fetcher.cc | ||
blob_fetcher.h | ||
blob_file_addition.cc | ||
blob_file_addition.h | ||
blob_file_addition_test.cc | ||
blob_file_builder.cc | ||
blob_file_builder.h | ||
blob_file_builder_test.cc | ||
blob_file_cache.cc | ||
blob_file_cache.h | ||
blob_file_cache_test.cc | ||
blob_file_completion_callback.h | ||
blob_file_garbage.cc | ||
blob_file_garbage.h | ||
blob_file_garbage_test.cc | ||
blob_file_meta.cc | ||
blob_file_meta.h | ||
blob_file_reader.cc | ||
blob_file_reader.h | ||
blob_file_reader_test.cc | ||
blob_garbage_meter.cc | ||
blob_garbage_meter.h | ||
blob_garbage_meter_test.cc | ||
blob_index.h | ||
blob_log_format.cc | ||
blob_log_format.h | ||
blob_log_sequential_reader.cc | ||
blob_log_sequential_reader.h | ||
blob_log_writer.cc | ||
blob_log_writer.h | ||
blob_read_request.h | ||
blob_source.cc | ||
blob_source.h | ||
blob_source_test.cc | ||
db_blob_basic_test.cc | ||
db_blob_compaction_test.cc | ||
db_blob_corruption_test.cc | ||
db_blob_index_test.cc | ||
prefetch_buffer_collection.cc | ||
prefetch_buffer_collection.h |