diff --git a/table/block.h b/table/block.h index bac9afc81..1fed0e297 100644 --- a/table/block.h +++ b/table/block.h @@ -259,7 +259,7 @@ class BlockIter final : public InternalIterator { } // Makes Valid() return false, status() return `s`, and Seek()/Prev()/etc do - // nothing. + // nothing. Calls cleanup functions. void Invalidate(Status s) { // Assert that the BlockIter is never deleted while Pinning is Enabled. assert(!pinned_iters_mgr_ || @@ -269,6 +269,9 @@ class BlockIter final : public InternalIterator { current_ = restarts_; status_ = s; + // Call cleanup callbacks. + Cleanable::Reset(); + // Clear prev entries cache. prev_entries_keys_buff_.clear(); prev_entries_.clear();