From e76448185c428a251dd0f856148691cfe553e7f6 Mon Sep 17 00:00:00 2001 From: Abhishek Madan Date: Tue, 27 Nov 2018 11:09:22 -0800 Subject: [PATCH] Remove DeleteRange experimental comment (#4709) Summary: DeleteRange is now ready for production use. Change the header comment to reflect this, and update HISTORY.md with the feature's status. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4709 Differential Revision: D13209055 Pulled By: abhimadan fbshipit-source-id: 65423eb1a4927cf593c38254cd87c322f73ae137 --- HISTORY.md | 1 + include/rocksdb/db.h | 16 ++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 99cb3dfb2..fe12cb6fb 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,7 @@ ## Unreleased ### New Features * Introduced `Memoryllocator`, which lets the user specify custom allocator for memory in block cache. +* Improved `DeleteRange` to prevent read performance degradation. The feature is no longer marked as experimental. ### Public API Change * `NO_ITERATORS` is divided into two counters `NO_ITERATOR_CREATED` and `NO_ITERATOR_DELETE`. Both of them are only increasing now, just as other counters. ### Bug Fixes diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index 51d4df598..6a37084c5 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -287,16 +287,12 @@ class DB { // a non-OK status on error. It is not an error if no keys exist in the range // ["begin_key", "end_key"). // - // This feature is currently an experimental performance optimization for - // deleting very large ranges of contiguous keys. Invoking it many times or on - // small ranges may severely degrade read performance; in particular, the - // resulting performance can be worse than calling Delete() for each key in - // the range. Note also the degraded read performance affects keys outside the - // deleted ranges, and affects database operations involving scans, like flush - // and compaction. - // - // Consider setting ReadOptions::ignore_range_deletions = true to speed - // up reads for key(s) that are known to be unaffected by range deletions. + // This feature is now usable in production, with the following caveats: + // 1) Accumulating many range tombstones in the memtable will degrade read + // performance; this can be avoided by manually flushing occasionally. + // 2) Limiting the maximum number of open files in the presence of range + // tombstones can degrade read performance. To avoid this problem, set + // max_open_files to -1 whenever possible. virtual Status DeleteRange(const WriteOptions& options, ColumnFamilyHandle* column_family, const Slice& begin_key, const Slice& end_key); -- GitLab