mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
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:
parent
6c3c7b152a
commit
0e4d76cc96
10 changed files with 211 additions and 172 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue