Initialized pinned_pos_ and pinned_seq_pos_ in FragmentedRangeTombstoneIterator (#5720)

Summary:
These uninitialized member variables can cause a key to not be pinned when it should be, causing erroneous behavior. For example ingesting a file with range deletion tombstones will yield an "external file have corrupted keys" on a Mac.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5720

Differential Revision: D17217673

fbshipit-source-id: cd7df7ce3ad9cf69c841c4d3dc6fd144eff9e212
This commit is contained in:
Jeffrey Xiao 2019-09-05 17:28:40 -07:00 committed by Facebook Github Bot
parent 83b991922e
commit eae9f040eb
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,8 @@ class FragmentedRangeTombstoneIterator : public InternalIterator {
void Invalidate() {
pos_ = tombstones_->end();
seq_pos_ = tombstones_->seq_end();
pinned_pos_ = tombstones_->end();
pinned_seq_pos_ = tombstones_->seq_end();
}
RangeTombstone Tombstone() const {