Unverified Commit cf0a909e authored by Igor's avatar Igor Committed by GitHub
Browse files

Introduce fast path to bypass expensive serveClientsBlockedOnKeyByModule call (#8689)

Introduce fast path to bypass expensive serveClientsBlockedOnKeyByModule call
parent 1976acfe
......@@ -480,6 +480,10 @@ void serveClientsBlockedOnStreamKey(robj *o, readyList *rl) {
void serveClientsBlockedOnKeyByModule(readyList *rl) {
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
* this key, from the first blocked to the last. */
de = dictFind(rl->db->blocking_keys,rl->key);
......
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