mirror of
https://github.com/fluencelabs/redis
synced 2025-05-16 20:41:19 +00:00
Fix patch provided in #6554.
This commit is contained in:
parent
6a9851c7f8
commit
b42466b925
@ -514,6 +514,13 @@ void handleClientsBlockedOnKeys(void) {
|
||||
* we can safely call signalKeyAsReady() against this key. */
|
||||
dictDelete(rl->db->ready_keys,rl->key);
|
||||
|
||||
/* Even if we are not inside call(), increment the call depth
|
||||
* in order to make sure that keys are expired against a fixed
|
||||
* reference time, and not against the wallclock time. This
|
||||
* way we can lookup an object multiple times (BRPOPLPUSH does
|
||||
* that) without the risk of it being freed in the second
|
||||
* lookup, invalidating the first one.
|
||||
* See https://github.com/antirez/redis/pull/6554. */
|
||||
server.call_depth++;
|
||||
updateCachedTime(0);
|
||||
|
||||
@ -533,7 +540,7 @@ void handleClientsBlockedOnKeys(void) {
|
||||
serveClientsBlockedOnKeyByModule(rl);
|
||||
}
|
||||
|
||||
server.call_depth++;
|
||||
server.call_depth--;
|
||||
|
||||
/* Free this item. */
|
||||
decrRefCount(rl->key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user