rocksdb/env
Hui Xiao f69a5fe8ee Cap compaction_readahead_size by max_sectors_kb (#12937)
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
2024-11-18 15:08:21 -08:00
..
composite_env.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
composite_env_wrapper.h Add some documentation for Env related interfaces (#12813) 2024-06-28 18:56:40 -07:00
emulated_clock.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
env.cc Add some documentation for Env related interfaces (#12813) 2024-06-28 18:56:40 -07:00
env_basic_test.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
env_chroot.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
env_chroot.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_encryption.cc Remove extra semi colon from internal_repo_rocksdb/repo/env/env_encryption.cc (#12274) 2024-01-24 07:22:49 -08:00
env_encryption_ctr.h Remove extra semi colon from internal_repo_rocksdb/repo/env/env_encryption_ctr.h 2024-01-23 06:07:30 -08:00
env_posix.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
env_test.cc Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
file_system.cc Fix missing cases of corruption retries (#13122) 2024-11-08 12:43:21 -08:00
file_system_tracer.cc Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
file_system_tracer.h Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
fs_on_demand.cc Fix compile error in Clang (#12588) 2024-05-02 16:54:21 -07:00
fs_on_demand.h Basic RocksDB follower implementation (#12540) 2024-04-19 19:13:31 -07:00
fs_posix.cc Cap compaction_readahead_size by max_sectors_kb (#12937) 2024-11-18 15:08:21 -08:00
fs_readonly.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fs_remap.cc Add missing RemapFileSystem::ReopenWritableFile (#12941) 2024-09-17 13:08:25 -07:00
fs_remap.h Add missing RemapFileSystem::ReopenWritableFile (#12941) 2024-09-17 13:08:25 -07:00
io_posix.cc Cap compaction_readahead_size by max_sectors_kb (#12937) 2024-11-18 15:08:21 -08:00
io_posix.h Cap compaction_readahead_size by max_sectors_kb (#12937) 2024-11-18 15:08:21 -08:00
io_posix_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
mock_env.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
mock_env.h Run clang-format on env/ folder (#10859) 2022-10-24 17:54:14 -07:00
mock_env_test.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
unique_id_gen.cc Fix windows build errors (rdtsc and fnptr) (#12008) 2023-10-24 16:20:37 -07:00
unique_id_gen.h Internal API for generating semi-random salt (#11331) 2023-06-21 11:32:49 -07:00