mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
feat(streams): Add support for XREAD BLOCK (#1291)
* feat(streams): Add support for XREAD BLOCK --------- Signed-off-by: Andrew Dunstall <andydunstall@hotmail.co.uk>
This commit is contained in:
parent
bc717a037d
commit
1cfeff21a4
7 changed files with 309 additions and 73 deletions
|
@ -212,9 +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 ||
|
||||
it->second.ObjType() == OBJ_ZSET)) // Only LIST and ZSET are allowed to block.
|
||||
// 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))
|
||||
continue;
|
||||
|
||||
NotifyWatchQueue(sv_key, &wt.queue_map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue