Don't do async keys command when client cannot block (#564)

Fixes #562
This commit is contained in:
Malavan Sotheeswaran authored and GitHub committed 2023-02-13 13:01:41 -05:00
1 parent a1978ce04c
commit 62d281b522
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -1059,7 +1059,7 @@ void keysCommand(client *c) {
sds pattern = szFromObj(c->argv[1]);
const redisDbPersistentDataSnapshot *snapshot = nullptr;
if (!(c->flags & (CLIENT_MULTI | CLIENT_BLOCKED)))
if (!(c->flags & (CLIENT_MULTI | CLIENT_BLOCKED | CLIENT_DENY_BLOCKING)))
snapshot = c->db->createSnapshot(c->mvccCheckpoint, true /* fOptional */);
if (snapshot != nullptr)
{
+4
View File
@@ -43,6 +43,10 @@ start_server {tags {"scripting"}} {
r eval {return redis.call('get',KEYS[1])} 1 mykey
} {myval}
test { EVAL - keys command works? } {
r eval {return redis.call('keys', 'test')} 0
}
test {EVALSHA - Can we call a SHA1 if already defined?} {
r evalsha fd758d1589d044dd850a6f05d52f2eefd27f033f 1 mykey
} {myval}