rocksdb/options
Andrew Kryczka 9402a77a37 No filesystem reads during Merge() writes (#12365)
Summary:
This occasional filesystem read in the write path has caused user pain. It doesn't seem very useful considering it only limits one component's merge chain length, and only helps merge uncached (i.e., infrequently read) values. This PR proposes allowing `max_successive_merges` to be exceeded when the value cannot be read from in-memory components. I included a rollback flag (`strict_max_successive_merges`) just in case.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12365

Test Plan:
"rocksdb.block.cache.data.add" is number of data blocks read from filesystem. Since the benchmark is write-only, compaction is disabled, and flush doesn't read data blocks, any nonzero value means the user write issued the read.

```
$ for s in false true; do echo -n "strict_max_successive_merges=$s: " && ./db_bench -value_size=64 -write_buffer_size=131072 -writes=128 -num=1 -benchmarks=mergerandom,flush,mergerandom -merge_operator=stringappend -disable_auto_compactions=true -compression_type=none -strict_max_successive_merges=$s -max_successive_merges=100 -statistics=true |& grep 'block.cache.data.add COUNT' ; done
strict_max_successive_merges=false: rocksdb.block.cache.data.add COUNT : 0
strict_max_successive_merges=true: rocksdb.block.cache.data.add COUNT : 1
```

Reviewed By: hx235

Differential Revision: D53982520

Pulled By: ajkr

fbshipit-source-id: e40f761a60bd601f232417ac0058e4a33ee9c0f4
2024-02-21 13:41:44 -08:00
..
cf_options.cc No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00
cf_options.h No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00
configurable.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
configurable_helper.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
configurable_test.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
configurable_test.h internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
customizable.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
customizable_test.cc Add some compressed and tiered secondary cache stats (#12150) 2023-12-15 11:34:08 -08:00
db_options.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
db_options.h Make OffpeakTimeInfo available in VersionSet (#12018) 2023-10-27 15:56:48 -07:00
offpeak_time_info.cc Mark more files for periodic compaction during offpeak (#12031) 2023-11-06 11:43:59 -08:00
offpeak_time_info.h Mark more files for periodic compaction during offpeak (#12031) 2023-11-06 11:43:59 -08:00
options.cc No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00
options_helper.cc No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00
options_helper.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options_parser.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
options_parser.h Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
options_settable_test.cc No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00
options_test.cc No filesystem reads during Merge() writes (#12365) 2024-02-21 13:41:44 -08:00