From: Mark Nelson Date: Thu, 21 Jul 2022 21:31:07 +0000 (+0000) Subject: kv/RocksDBStore: Add CompactOnDeletion support X-Git-Tag: v16.2.13~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cfec1e399df83afdc565d7f848d7cad10c3d3255;p=ceph.git kv/RocksDBStore: Add CompactOnDeletion support This commit adds support to compact column families when a certain number of tombstone entries have been observed within a certain sliding window during iteration. It only helps when itereating over entries already in SST files and not when iterating over ranges in memtables. Likely we will still need to provide a mechanism to flush memtables and compact column families once a certain number of rmkey or rm_range_key calls are made. Signed-off-by: Mark Nelson (cherry picked from commit fba5488728e89d9b0a1c1ab94b7024fcc81b3b15) Conflicts: src/common/options/global.yaml.in Cherry-pick notes: - Conflicts due to change in configuration options format after Pacific (cherry picked from commit 317eb8f69834fa08dbb17b19656db2359dbdcbd0) --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index d9a9872784d32..ea103d7de9ebb 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -806,6 +806,10 @@ OPTION(rocksdb_collect_compaction_stats, OPT_BOOL) //For rocksdb, this behavior OPTION(rocksdb_collect_extended_stats, OPT_BOOL) //For rocksdb, this behavior will be an overhead of 5%~10%, collected only rocksdb_perf is enabled. OPTION(rocksdb_collect_memory_stats, OPT_BOOL) //For rocksdb, this behavior will be an overhead of 5%~10%, collected only rocksdb_perf is enabled. +OPTION(rocksdb_cf_compact_on_deletion, OPT_BOOL) +OPTION(rocksdb_cf_compact_on_deletion_sliding_window, OPT_INT) +OPTION(rocksdb_cf_compact_on_deletion_trigger, OPT_INT) + // rocksdb options that will be used for omap(if omap_backend is rocksdb) OPTION(filestore_rocksdb_options, OPT_STR) // rocksdb options that will be used in monstore diff --git a/src/common/options.cc b/src/common/options.cc index 3d82cfc05a5cb..457d0ef812163 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3972,6 +3972,22 @@ std::vector