From c755c637c6705ce116bb7a84fb807dd08b1995fb Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 29 Jun 2011 16:10:28 +0200 Subject: [PATCH] Partial fix for a problem with AOF and BRPOP. We have at least a single evidence of an AOF that ended with a BRPOP call against an empty list, causing later issues at run time. Now the problem is detected while loading the AOF at startup, even if it is still to understand how the corrupted AOF was generated. --- src/aof.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/aof.c b/src/aof.c index 16dbeab6..3abda409 100644 --- a/src/aof.c +++ b/src/aof.c @@ -288,6 +288,8 @@ int loadAppendOnlyFile(char *filename) { /* The fake client should not have a reply */ redisAssert(fakeClient->bufpos == 0 && listLength(fakeClient->reply) == 0); + /* The fake client should never get blocked */ + redisAssert((fakeClient->flags & REDIS_BLOCKED) == 0); /* Clean up. Command code may have changed argv/argc so we use the * argv/argc of the client instead of the local variables. */