summaryrefslogtreecommitdiff
path: root/TARGETS
diff options
context:
space:
mode:
authormayue.fight <mayue.fight@bytedance.com>2023-05-18 13:25:01 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2023-05-18 13:25:01 -0700
commit8d8eb0e77e13a3902d23fbda742dc47aa7bc418f (patch)
tree7dcf17ca36913341091b24c40ed342dddbb0bd79 /TARGETS
parent7263f51d50ad5ad1cb3835ac3ef221567264dafe (diff)
Support Clip DB to KeyRange (#11379)
Summary: This PR is part of the request https://github.com/facebook/rocksdb/issues/11317. (Another part is https://github.com/facebook/rocksdb/pull/11378) ClipDB() will clip the entries in the CF according to the range [begin_key, end_key). All the entries outside this range will be completely deleted (including tombstones). This feature is mainly used to ensure that there is no overlapping Key when calling CreateColumnFamilyWithImports() to import multiple CFs. When Calling ClipDB [begin, end), there are the following steps 1. Quickly and directly delete files without overlap DeleteFilesInRanges(nullptr, begin) + DeleteFilesInRanges(end, nullptr) 2. Delete the Key outside the range Delete[smallest_key, begin) + Delete[end, largest_key] 3. Delete the tombstone through Manul Compact CompactRange(option, nullptr, nullptr) Pull Request resolved: https://github.com/facebook/rocksdb/pull/11379 Reviewed By: ajkr Differential Revision: D45840358 Pulled By: cbi42 fbshipit-source-id: 54152e8a45fd8ede137f99787eb252f0b51440a4
Diffstat (limited to 'TARGETS')
-rw-r--r--TARGETS6
1 files changed, 6 insertions, 0 deletions
diff --git a/TARGETS b/TARGETS
index 52a29b774..ff5321312 100644
--- a/TARGETS
+++ b/TARGETS
@@ -4750,6 +4750,12 @@ cpp_unittest_wrapper(name="db_bloom_filter_test",
extra_compiler_flags=[])
+cpp_unittest_wrapper(name="db_clip_test",
+ srcs=["db/db_clip_test.cc"],
+ deps=[":rocksdb_test_lib"],
+ extra_compiler_flags=[])
+
+
cpp_unittest_wrapper(name="db_compaction_filter_test",
srcs=["db/db_compaction_filter_test.cc"],
deps=[":rocksdb_test_lib"],