summaryrefslogtreecommitdiff
path: root/src/t_stream.c
diff options
context:
space:
mode:
authorguybe7 <guy.benoish@redislabs.com>2021-03-30 22:48:01 +0200
committerGitHub <noreply@github.com>2021-03-30 23:48:01 +0300
commit2c120af61e31ead165175556a9564722d4d0149b (patch)
tree3494c947f0785b401a82b480a4d9aed57a9f4c1f /src/t_stream.c
parent91f4f41665c4e9e0ad248ce0b528644de28d0acd (diff)
downloadredis-2c120af61e31ead165175556a9564722d4d0149b.tar.gz
XAUTOCLAIM: JUSTID should prevent incrementing delivery_count (#8724)
To align with XCLAIM and the XAUTOCLAIM docs
Diffstat (limited to 'src/t_stream.c')
-rw-r--r--src/t_stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/t_stream.c b/src/t_stream.c
index 2abce2b6a..1407ee98b 100644
--- a/src/t_stream.c
+++ b/src/t_stream.c
@@ -3121,7 +3121,9 @@ void xautoclaimCommand(client *c) {
/* Update the consumer and idle time. */
nack->delivery_time = now;
- nack->delivery_count++;
+ /* Increment the delivery attempts counter unless JUSTID option provided */
+ if (!justid)
+ nack->delivery_count++;
if (nack->consumer != consumer) {
/* Add the entry in the new consumer local PEL. */