Commit 183ef7ae authored by zhaozhao.zz's avatar zhaozhao.zz
Browse files

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.
parent 4dc48a0d
......@@ -2165,8 +2165,10 @@ void xclaimCommand(client *c) {
if (nack != raxNotFound) {
/* We need to check if the minimum idle time requested
* by the caller is satisfied by this entry. */
if (minidle) {
* by the caller is satisfied by this entry.
* 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;
if (this_idle < minidle) continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment