From 3fac516950e831129da856f32fa373a56a6268a1 Mon Sep 17 00:00:00 2001 From: John Sully Date: Mon, 21 Oct 2019 12:21:46 -0400 Subject: [PATCH] Disable multithreaded KEYS due to bugs --- src/db.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/db.cpp b/src/db.cpp index 0d5042bab..f34245964 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -643,7 +643,9 @@ void keysCommand(client *c) { unsigned long numkeys = 0; void *replylen = addReplyDeferredLen(c); +#ifdef MULTITHREADED_KEYS aeReleaseLock(); +#endif di = dictGetSafeIterator(c->db->pdict); allkeys = (pattern[0] == '*' && pattern[1] == '\0'); @@ -663,11 +665,13 @@ void keysCommand(client *c) { dictReleaseIterator(di); setDeferredArrayLen(c,replylen,numkeys); +#ifdef MULTITHREADED_KEYS fastlock_unlock(&c->db->lock); // we must release the DB lock before acquiring the AE lock to prevent deadlocks AeLocker lock; lock.arm(c); fastlock_lock(&c->db->lock); // we still need the DB lock lock.release(); +#endif } /* This callback is used by scanGenericCommand in order to collect elements