Remove unlocked KEYS command support, we will do this with snapshotting
Former-commit-id: 4396682c07d4df3fdca01d1299ad171e310a9fc7
This commit is contained in:
parent
8d2dc7ab52
commit
b39e6c9497
@ -643,8 +643,6 @@ void keysCommand(client *c) {
|
|||||||
unsigned long numkeys = 0;
|
unsigned long numkeys = 0;
|
||||||
void *replylen = addReplyDeferredLen(c);
|
void *replylen = addReplyDeferredLen(c);
|
||||||
|
|
||||||
aeReleaseLock();
|
|
||||||
|
|
||||||
di = dictGetSafeIterator(c->db->pdict);
|
di = dictGetSafeIterator(c->db->pdict);
|
||||||
allkeys = (pattern[0] == '*' && pattern[1] == '\0');
|
allkeys = (pattern[0] == '*' && pattern[1] == '\0');
|
||||||
while((de = dictNext(di)) != NULL) {
|
while((de = dictNext(di)) != NULL) {
|
||||||
@ -662,12 +660,6 @@ void keysCommand(client *c) {
|
|||||||
}
|
}
|
||||||
dictReleaseIterator(di);
|
dictReleaseIterator(di);
|
||||||
setDeferredArrayLen(c,replylen,numkeys);
|
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
|
/* This callback is used by scanGenericCommand in order to collect elements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user