Fix performance regression in Get() for block-based tables (#3953)
Summary:
This fixes a regression in one of myrocks regression tests (readwhilewriting), introduced in 8bf555f487
This PR changes two lines of code: one of them actually fixes the observed regression, the other is a mostly unrelated small fix that I'm piggy-backing here. EDIT: Nevermind, it fixes one line. More details in inline comments.
Closes https://github.com/facebook/rocksdb/pull/3953
Differential Revision: D8270664
Pulled By: al13n321
fbshipit-source-id: a7d91e196807d1e816551591257c700f70e4ccac
This commit is contained in:
parent
d0c38c0c8c
commit
812c7371d3
@ -259,7 +259,7 @@ class BlockIter final : public InternalIterator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Makes Valid() return false, status() return `s`, and Seek()/Prev()/etc do
|
// Makes Valid() return false, status() return `s`, and Seek()/Prev()/etc do
|
||||||
// nothing.
|
// nothing. Calls cleanup functions.
|
||||||
void Invalidate(Status s) {
|
void Invalidate(Status s) {
|
||||||
// Assert that the BlockIter is never deleted while Pinning is Enabled.
|
// Assert that the BlockIter is never deleted while Pinning is Enabled.
|
||||||
assert(!pinned_iters_mgr_ ||
|
assert(!pinned_iters_mgr_ ||
|
||||||
@ -269,6 +269,9 @@ class BlockIter final : public InternalIterator {
|
|||||||
current_ = restarts_;
|
current_ = restarts_;
|
||||||
status_ = s;
|
status_ = s;
|
||||||
|
|
||||||
|
// Call cleanup callbacks.
|
||||||
|
Cleanable::Reset();
|
||||||
|
|
||||||
// Clear prev entries cache.
|
// Clear prev entries cache.
|
||||||
prev_entries_keys_buff_.clear();
|
prev_entries_keys_buff_.clear();
|
||||||
prev_entries_.clear();
|
prev_entries_.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user