mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
Feat bzpopmin (#1232)
* chore: Refactor out common code from BPop ops * feat: Implement blocking ZSET commands * Add tests for blocking ZSET commands. * Refactor changes into container_utils
This commit is contained in:
parent
e8fb0b9580
commit
6697478a28
10 changed files with 356 additions and 213 deletions
|
@ -212,7 +212,9 @@ void BlockingController::NotifyPending() {
|
|||
|
||||
// Double verify we still got the item.
|
||||
auto [it, exp_it] = owner_->db_slice().FindExt(context, sv_key);
|
||||
if (!IsValid(it) || it->second.ObjType() != OBJ_LIST) // Only LIST is allowed to block.
|
||||
if (!IsValid(it) ||
|
||||
!(it->second.ObjType() == OBJ_LIST ||
|
||||
it->second.ObjType() == OBJ_ZSET)) // Only LIST and ZSET are allowed to block.
|
||||
continue;
|
||||
|
||||
NotifyWatchQueue(sv_key, &wt.queue_map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue