From 60ef787efad8be46afa29ec751532e3ea7ebd70c Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 18 Apr 2012 17:38:02 +0200 Subject: [PATCH] Document mostly dead code in RPOPLPUSH implementation. --- src/t_list.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/t_list.c b/src/t_list.c index 6a16a632..ca03916b 100644 --- a/src/t_list.c +++ b/src/t_list.c @@ -699,6 +699,8 @@ void rpoplpushCommand(redisClient *c) { checkType(c,sobj,REDIS_LIST)) return; if (listTypeLength(sobj) == 0) { + /* This may only happen after loading very old RDB files. Recent + * versions of Redis delete keys of empty lists. */ addReply(c,shared.nullbulk); } else { robj *dobj = lookupKeyWrite(c->db,c->argv[2]); -- 2.45.2