From: antirez Date: Wed, 18 Apr 2012 15:38:02 +0000 (+0200) Subject: Document mostly dead code in RPOPLPUSH implementation. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/60ef787efad8be46afa29ec751532e3ea7ebd70c Document mostly dead code in RPOPLPUSH implementation. --- 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]);