Fix RangeDeletion Snapshot bug
This commit is contained in:
parent
a752fe311d
commit
1db81809d5
@ -186,11 +186,14 @@ Status MemTableListVersion::AddRangeTombstoneIterators(
|
||||
const ReadOptions& read_opts, Arena* /*arena*/,
|
||||
RangeDelAggregator* range_del_agg) {
|
||||
assert(range_del_agg != nullptr);
|
||||
SequenceNumber snapshot = kMaxSequenceNumber;
|
||||
if (read_opts.snapshot != nullptr) {
|
||||
snapshot = read_opts.snapshot->GetSequenceNumber();
|
||||
}
|
||||
for (auto& m : memlist_) {
|
||||
// Using kMaxSequenceNumber is OK because these are immutable memtables.
|
||||
std::unique_ptr<FragmentedRangeTombstoneIterator> range_del_iter(
|
||||
m->NewRangeTombstoneIterator(read_opts,
|
||||
kMaxSequenceNumber /* read_seq */));
|
||||
m->NewRangeTombstoneIterator(read_opts, snapshot /* read_seq */));
|
||||
range_del_agg->AddTombstones(std::move(range_del_iter));
|
||||
}
|
||||
return Status::OK();
|
||||
|
Loading…
x
Reference in New Issue
Block a user