diff options
author | Mark Nelson <mnelson@redhat.com> | 2022-11-28 17:32:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 17:32:16 +0100 |
commit | 85e2757e85eb5939a202e878b9a8ca694d7acc29 (patch) | |
tree | 9b223e3cb767ec0e70607e2c7f4d1849e5e12f6d /src/kv | |
parent | Merge pull request #48875 from yuvalif/wip-yuval-fix-58014 (diff) | |
parent | kv/RocksDBStore: Add CompactOnDeletion support (diff) | |
download | ceph-85e2757e85eb5939a202e878b9a8ca694d7acc29.tar.xz ceph-85e2757e85eb5939a202e878b9a8ca694d7acc29.zip |
Merge pull request #47221 from markhpc/wip-faster-rocksdb
[WIP] kv/RocksDBStore: Improved RocksDB Settings and Tombstone behavior
Diffstat (limited to 'src/kv')
-rw-r--r-- | src/kv/RocksDBStore.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index be032b4fa86..a3ecf3a5a1f 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -18,6 +18,7 @@ #include "rocksdb/cache.h" #include "rocksdb/filter_policy.h" #include "rocksdb/utilities/convenience.h" +#include "rocksdb/utilities/table_properties_collectors.h" #include "rocksdb/merge_operator.h" #include "common/perf_counters.h" @@ -934,6 +935,14 @@ int RocksDBStore::update_column_family_options(const std::string& base_name, return r; } } + + // Set Compact on Deletion Factory + if (cct->_conf->rocksdb_cf_compact_on_deletion) { + size_t sliding_window = cct->_conf->rocksdb_cf_compact_on_deletion_sliding_window; + size_t trigger = cct->_conf->rocksdb_cf_compact_on_deletion_trigger; + cf_opt->table_properties_collector_factories.emplace_back( + rocksdb::NewCompactOnDeletionCollectorFactory(sliding_window, trigger)); + } return 0; } |