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:
Roy Jacobson 2023-05-21 03:48:45 +03:00 committed by GitHub
parent e8fb0b9580
commit 6697478a28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 356 additions and 213 deletions

View file

@ -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);