speedb-io / speedb

A RocksDB compliant high performance scalable embedded key-value store
https://www.speedb.io/
Apache License 2.0
882 stars 65 forks source link

Compaction: Restore SetupForCompaction functionality #788

Closed Yuval-Ariel closed 7 months ago

Yuval-Ariel commented 8 months ago

In https://github.com/facebook/rocksdb/pull/11658, files are no longer controlled by the access_hint_on_compaction_start flag by removing the content of SetupForCompaction. However, this leads to degradation in compaction read speed when combined with compaction_readahead_size since once a file is opened, in linux, it is hinted with POSIX_FADV_RANDOM.

See https://github.com/speedb-io/speedb/issues/787 for full details.

Add back the default hint to avoid degradation in this scenario.