Introduce fast path to bypass expensive serveClientsBlockedOnKeyByModule call (#8689)
Introduce fast path to bypass expensive serveClientsBlockedOnKeyByModule call
This commit is contained in:
parent
1976acfe3e
commit
cf0a909e2d
@ -480,6 +480,10 @@ void serveClientsBlockedOnStreamKey(robj *o, readyList *rl) {
|
|||||||
void serveClientsBlockedOnKeyByModule(readyList *rl) {
|
void serveClientsBlockedOnKeyByModule(readyList *rl) {
|
||||||
dictEntry *de;
|
dictEntry *de;
|
||||||
|
|
||||||
|
/* Optimization: If no clients are in type BLOCKED_MODULE,
|
||||||
|
* we can skip this loop. */
|
||||||
|
if (!server.blocked_clients_by_type[BLOCKED_MODULE]) return;
|
||||||
|
|
||||||
/* We serve clients in the same order they blocked for
|
/* We serve clients in the same order they blocked for
|
||||||
* this key, from the first blocked to the last. */
|
* this key, from the first blocked to the last. */
|
||||||
de = dictFind(rl->db->blocking_keys,rl->key);
|
de = dictFind(rl->db->blocking_keys,rl->key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user