Remove unlocked KEYS command support, we will do this with snapshotting

Former-commit-id: 4396682c07d4df3fdca01d1299ad171e310a9fc7
This commit is contained in:
John Sully 2019-10-24 20:18:11 -04:00
parent 8d2dc7ab52
commit b39e6c9497

View File

@ -643,8 +643,6 @@ void keysCommand(client *c) {
unsigned long numkeys = 0;
void *replylen = addReplyDeferredLen(c);
aeReleaseLock();
di = dictGetSafeIterator(c->db->pdict);
allkeys = (pattern[0] == '*' && pattern[1] == '\0');
while((de = dictNext(di)) != NULL) {
@ -662,12 +660,6 @@ void keysCommand(client *c) {
}
dictReleaseIterator(di);
setDeferredArrayLen(c,replylen,numkeys);
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();
}
/* This callback is used by scanGenericCommand in order to collect elements