diff --git a/db/external_sst_file_basic_test.cc b/db/external_sst_file_basic_test.cc index 7fc5bc260..51c53a41f 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 a56c46b39..2a5d11db3 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.