mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Streams: XCLAIM ignore minidle if NACK is created by FORCE
Because the NACK->consumer is NULL, if idletime < minidle the NACK does not belong to any consumer, then redis will crash in XPENDING.
This commit is contained in:
parent
4dc48a0d11
commit
183ef7ae9b
@ -2165,8 +2165,10 @@ void xclaimCommand(client *c) {
|
|||||||
|
|
||||||
if (nack != raxNotFound) {
|
if (nack != raxNotFound) {
|
||||||
/* We need to check if the minimum idle time requested
|
/* We need to check if the minimum idle time requested
|
||||||
* by the caller is satisfied by this entry. */
|
* by the caller is satisfied by this entry.
|
||||||
if (minidle) {
|
* Note that if nack->consumer is NULL, means the NACK
|
||||||
|
* is created by FORCE, we should ignore minidle. */
|
||||||
|
if (nack->consumer && minidle) {
|
||||||
mstime_t this_idle = now - nack->delivery_time;
|
mstime_t this_idle = now - nack->delivery_time;
|
||||||
if (this_idle < minidle) continue;
|
if (this_idle < minidle) continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user