diff --git a/db/external_sst_file_basic_test.cc b/db/external_sst_file_basic_test.cc index 7fc5bc260c214ab3a03a65b82d871ad1142443fa..51c53a41f6c1ab0cc943e0d99987e751e0180d3a 100644 --- a/db/external_sst_file_basic_test.cc +++ b/db/external_sst_file_basic_test.cc @@ -102,7 +102,8 @@ class ExternalSSTFileBasicTest // all point operators, even though sst_file_writer.DeleteRange // must be called before other sst_file_writer methods. This is // because point writes take precedence over range deletions - // in the same ingested sst. + // in the same ingested sst. This precedence is part of + // `SstFileWriter::DeleteRange()`'s API contract. std::string start_key = Key(range_deletions[i].first); std::string end_key = Key(range_deletions[i].second); s = sst_file_writer.DeleteRange(start_key, end_key); diff --git a/include/rocksdb/sst_file_writer.h b/include/rocksdb/sst_file_writer.h index a56c46b3980017c722cb4c54df51ee5ff4b902db..2a5d11db3ae826e1cbe236323a5ff38e7a07b5db 100644 --- a/include/rocksdb/sst_file_writer.h +++ b/include/rocksdb/sst_file_writer.h @@ -143,11 +143,13 @@ class SstFileWriter { // the comparator. Status Delete(const Slice& user_key, const Slice& timestamp); - // Add a range deletion tombstone to currently opened file + // Add a range deletion tombstone to currently opened file. Such a range + // deletion tombstone does NOT delete other (point) keys in the same file. // REQUIRES: comparator is *not* timestamp-aware. Status DeleteRange(const Slice& begin_key, const Slice& end_key); - // Add a range deletion tombstone to currently opened file. + // Add a range deletion tombstone to currently opened file. Such a range + // deletion tombstone does NOT delete other (point) keys in the same file. // REQUIRES: begin_key and end_key are user keys without timestamp. // REQUIRES: the timestamp's size is equal to what is expected by // the comparator.