From f05aa7a85ac80bfd2d93d02aa43b389431d7d214 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" <276441700@qq.com> Date: Tue, 2 Feb 2021 16:51:19 +0800 Subject: [PATCH] XINFO should use lookupKeyReadOrReply (#8436) This bug would have let users observe logically expired keys on replicas and during CLIENT PAUSE WRITE. --- src/t_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index 197b7d4f7..32bfa1f7d 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -3471,7 +3471,7 @@ NULL key = c->argv[2]; /* 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; s = o->ptr;