summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorguybe7 <guy.benoish@redislabs.com>2022-03-08 17:10:36 +0200
committerGitHub <noreply@github.com>2022-03-08 17:10:36 +0200
commit2a2954086a28b9969882158a5b0630c3f944c051 (patch)
treedcb2e312467c9dcbf07b3bf46f2342ca84b6cb04 /redis.conf
parent728e62523e1a7998ed30be2ab0a6947390ff6a87 (diff)
downloadredis-2a2954086a28b9969882158a5b0630c3f944c051.tar.gz
XREADGROUP: Unblock client if stream is deleted (#10306)
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)
Diffstat (limited to 'redis.conf')
0 files changed, 0 insertions, 0 deletions