mirror of
https://github.com/facebook/rocksdb.git
synced 2026-10-26 07:59:32 +03:00
Summary: **Context/Summary:** https://github.com/facebook/rocksdb/issues/12038 reported a regression where compaction read ahead does not work when `compaction_readahead_size ` is greater than `max_sectors_kb` defined in linux (i.e, largest I/O size that the OS issues to a block device, see https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt for more). This PR fixes it by capping the `compaction_readahead_size` by `max_sectors_kb` if any. A refactoring of reading queue sys file is also included to reuse existing code. Pull Request resolved: https://github.com/facebook/rocksdb/pull/12937 Test Plan: https://github.com/facebook/rocksdb/issues/12038#issuecomment-2327618031 verified the regression was fixed Reviewed By: anand1976 Differential Revision: D61350188 Pulled By: hx235 fbshipit-source-id: e10677f2f5854c22ebf6318b052557db94b98abe