mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
1ed7d9b1b5
Summary: Before this PR it calls GetFileSize() once for each sst file in the DB. This can take a long time if there are be tens of thousands of sst files (e.g. in thousands of column families), and even longer if Env is talking to some remote service rather than local filesystem. This PR makes DB::Open() use sst file sizes that are already known from manifest (typically almost all files in the DB) and only call GetFileSize() for non-sst or obsolete files. Note that GetFileSize() is also called and checked against manifest in CheckConsistency(), so the calls in SstFileManagerImpl were completely redundant. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6363 Test Plan: deployed to a test cluster, looked at a dump of Env calls (from a custom instrumented Env) - no more thousands of GetFileSize()s. Differential Revision: D19702509 Pulled By: al13n321 fbshipit-source-id: 99f8110620cb2e9d0c092dfcdbb11f3af4ff8b73 |
||
---|---|---|
.. | ||
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 | ||
random_access_file_reader.cc | ||
random_access_file_reader.h | ||
read_write_util.cc | ||
read_write_util.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 |