Make it possible to enable periodic compactions for BlobDB (#6172)

Summary:
Periodic compactions ensure that even SSTs that do not get picked up
otherwise eventually go through compaction; used in conjunction with
BlobDB's garbage collection, they enable BlobDB to reclaim space when
old blob files are used by such straggling SSTs.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6172

Test Plan: Ran `make check` and used the BlobDB mode of `db_bench`.

Differential Revision: D19045045

Pulled By: ltamasi

fbshipit-source-id: 04636ecc4b6cfe8d495bf656faa65d54a5eb1a93
This commit is contained in:
Levi Tamasi 2019-12-13 15:52:38 -08:00 committed by Facebook Github Bot
parent afa2420c2b
commit 0d2172f128

View file

@ -148,10 +148,6 @@ Status BlobDBImpl::Open(std::vector<ColumnFamilyHandle*>* handles) {
"Garbage collection cutoff must be in the interval [0.0, 1.0]");
}
// BlobDB does not support Periodic Compactions. So disable periodic
// compactions irrespective of the user set value.
cf_options_.periodic_compaction_seconds = 0;
// Temporarily disable compactions in the base DB during open; save the user
// defined value beforehand so we can restore it once BlobDB is initialized.
// Note: this is only needed if garbage collection is enabled.