mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
2a2954086a
Deleting a stream while a client is blocked XREADGROUP should unblock the client. The idea is that if a client is blocked via XREADGROUP is different from any other blocking type in the sense that it depends on the existence of both the key and the group. Even if the key is deleted and then revived with XADD it won't help any clients blocked on XREADGROUP because the group no longer exist, so they would fail with -NOGROUP anyway. The conclusion is that it's better to unblock these clients (with error) upon the deletion of the key, rather than waiting for the first XADD. Other changes: 1. Slightly optimize all `serveClientsBlockedOn*` functions by checking `server.blocked_clients_by_type` 2. All `serveClientsBlockedOn*` functions now use a list iterator rather than looking at `listFirst`, relying on `unblockClient` to delete the head of the list. Before this commit, only `serveClientsBlockedOnStreams` used to work like that. 3. bugfix: CLIENT UNBLOCK ERROR should work even if the command doesn't have a timeout_callback (only relevant to module commands) |
||
---|---|---|
.. | ||
hash.tcl | ||
incr.tcl | ||
list-2.tcl | ||
list-3.tcl | ||
list-common.tcl | ||
list.tcl | ||
set.tcl | ||
stream-cgroups.tcl | ||
stream.tcl | ||
string.tcl | ||
zset.tcl |