conf item to toggle periodic cleanup for rocksdb

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-06 17:37:56 -07:00 committed by June
parent 865b5d7241
commit bade4ed17f
3 changed files with 12 additions and 0 deletions

View file

@ -545,6 +545,10 @@ impl KeyValueDatabase {
}
fn perform_cleanup() {
if !services().globals.config.rocksdb_periodic_cleanup {
return;
}
let start = Instant::now();
if let Err(e) = services().globals.cleanup() {
error!(target: "database-cleanup", "Ran into an error during cleanup: {}", e);