refactor(DbSlice): Replace FindExt() with FindMutable() and FindReadOnly (#2308)

* refactor(DbSlice): Replace `FindExt()` with `FindMutable()` and `FindReadOnly`

* fix

* `ExpireConstIterator`

* Don't update stats on FindMutable()

* auto&

* ReadOnly

* Remove redundant call

* move() before

* Remove redundant post_updater

* Update comment
This commit is contained in:
Shahar Mike 2023-12-20 08:04:39 +02:00 committed by GitHub
parent 6c3c7b152a
commit 0e4d76cc96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 211 additions and 172 deletions

View file

@ -214,7 +214,7 @@ void BlockingController::NotifyPending() {
DVLOG(1) << "Processing awakened key " << sv_key;
// Double verify we still got the item.
auto [it, exp_it] = owner_->db_slice().FindExt(context, sv_key);
auto [it, exp_it] = owner_->db_slice().FindReadOnly(context, sv_key);
// Only LIST, ZSET and STREAM are allowed to block.
if (!IsValid(it) || !(it->second.ObjType() == OBJ_LIST || it->second.ObjType() == OBJ_ZSET ||
it->second.ObjType() == OBJ_STREAM))