mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +00:00
Bugfix: PEL is incorrect when consumer is blocked using xreadgroup with NOACK option.
Save NOACK option into client.blockingState structure.
This commit is contained in:
committed by
Salvatore Sanfilippo
parent
b67f027699
commit
61f12973f7
@ -382,6 +382,7 @@ void handleClientsBlockedOnKeys(void) {
|
||||
* consumer here. */
|
||||
streamCG *group = NULL;
|
||||
streamConsumer *consumer = NULL;
|
||||
int noack = 0;
|
||||
if (receiver->bpop.xread_group) {
|
||||
group = streamLookupCG(s,
|
||||
receiver->bpop.xread_group->ptr);
|
||||
@ -396,6 +397,7 @@ void handleClientsBlockedOnKeys(void) {
|
||||
consumer = streamLookupConsumer(group,
|
||||
receiver->bpop.xread_consumer->ptr,
|
||||
1);
|
||||
noack = receiver->bpop.xread_group_noack;
|
||||
}
|
||||
|
||||
/* Emit the two elements sub-array consisting of
|
||||
@ -412,7 +414,7 @@ void handleClientsBlockedOnKeys(void) {
|
||||
};
|
||||
streamReplyWithRange(receiver,s,&start,NULL,
|
||||
receiver->bpop.xread_count,
|
||||
0, group, consumer, 0, &pi);
|
||||
0, group, consumer, noack, &pi);
|
||||
|
||||
/* Note that after we unblock the client, 'gt'
|
||||
* and other receiver->bpop stuff are no longer
|
||||
|
Reference in New Issue
Block a user