From eae9f040eb1914e32c59e36cf57db2e7fa80098e Mon Sep 17 00:00:00 2001 From: Jeffrey Xiao Date: Thu, 5 Sep 2019 17:28:40 -0700 Subject: [PATCH] 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 --- db/range_tombstone_fragmenter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/range_tombstone_fragmenter.h b/db/range_tombstone_fragmenter.h index a0b77b677..23a28396f 100644 --- a/db/range_tombstone_fragmenter.h +++ b/db/range_tombstone_fragmenter.h @@ -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 {