Unverified Commit f2a5fe36 authored by zhaozhao.zz's avatar zhaozhao.zz Committed by GitHub
Browse files

XINFO should use lookupKeyReadOrReply (#8436)

This bug would have let users observe logically expired keys on replicas and
during CLIENT PAUSE WRITE.
parent b57d0eb4
...@@ -3471,7 +3471,7 @@ NULL ...@@ -3471,7 +3471,7 @@ NULL
key = c->argv[2]; key = c->argv[2];
/* Lookup the key now, this is common for all the subcommands but HELP. */ /* Lookup the key now, this is common for all the subcommands but HELP. */
robj *o = lookupKeyWriteOrReply(c,key,shared.nokeyerr); robj *o = lookupKeyReadOrReply(c,key,shared.nokeyerr);
if (o == NULL || checkType(c,o,OBJ_STREAM)) return; if (o == NULL || checkType(c,o,OBJ_STREAM)) return;
s = o->ptr; s = o->ptr;
......
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