fix deleterange asan issue

Summary:
pinned_iters_mgr_ pins iterators allocated with arena_, so we should order the
instance variable declarations such that the pinned iterators have their destructors
executed before the arena is destroyed.
Closes https://github.com/facebook/rocksdb/pull/1528

Differential Revision: D4191984

Pulled By: ajkr

fbshipit-source-id: 1386f20
This commit is contained in:
Andrew Kryczka 2016-11-16 13:52:00 -08:00 committed by Facebook Github Bot
parent 327085b7b2
commit 760ef68a69

View File

@ -89,9 +89,10 @@ class RangeDelAggregator {
Status AddTombstones(InternalIterator* input, bool arena); Status AddTombstones(InternalIterator* input, bool arena);
TombstoneMap& GetTombstoneMap(SequenceNumber seq); TombstoneMap& GetTombstoneMap(SequenceNumber seq);
PinnedIteratorsManager pinned_iters_mgr_;
StripeMap stripe_map_; StripeMap stripe_map_;
const InternalKeyComparator icmp_; const InternalKeyComparator icmp_;
Arena arena_; Arena arena_; // must be destroyed after pinned_iters_mgr_ which references
// memory in this arena
PinnedIteratorsManager pinned_iters_mgr_;
}; };
} // namespace rocksdb } // namespace rocksdb