@@ -12,7 +12,7 @@ namespace ROCKSDB_NAMESPACE {
12
12
// of the given write batch with index (WBWI) object. This can be used to ingest
13
13
// a transaction (which is based on WBWI) into the DB as an immutable memtable.
14
14
//
15
- // REQUIRE overwrite_key to be true for the WBWI
15
+ // REQUIRES: overwrite_key to be true for the WBWI
16
16
// Since the keys in WBWI do not have sequence number, this class is responsible
17
17
// for assigning sequence numbers to the keys. This memtable needs to be
18
18
// assigned a range of sequence numbers through AssignSequenceNumbers(seqno)
@@ -23,10 +23,13 @@ namespace ROCKSDB_NAMESPACE {
23
23
// sequence number assigned is seqno.lower_bound + update_count - 1. So more
24
24
// recent updates will have higher sequence number.
25
25
//
26
- // WBWI with overwrite mode keeps track of the most recent update for each key,
27
- // so this memtable contains one update per key usually. However, there is a
28
- // special case where this memtable needs to emit an extra SingleDelete even
29
- // when the SD is overwritten by another update.
26
+ // Since WBWI with overwrite mode keeps track of the most recent update for
27
+ // each key, this memtable contains one update per key usually. However, there
28
+ // are two exceptions:
29
+ // 1. Merge operations: Each Merge operation do not overwrite existing entries,
30
+ // if a user uses Merge, multiple entries may be kept.
31
+ // 2. Overwriten SingleDelete: this memtable needs to emit an extra
32
+ // SingleDelete even when the SD is overwritten by another update.
30
33
// Consider the following scenario:
31
34
// - WBWI has SD(k) then PUT(k, v1)
32
35
// - DB has PUT(k, v2) in L1
0 commit comments