summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-06-29 16:10:28 +0200
committerantirez <antirez@gmail.com>2011-06-29 16:10:28 +0200
commitd3b59891486643d11208ab4a42f253f79dd09a6a (patch)
treecf6bf7beb866ba97a636aaf879b23babe94c9efc
parenta2d68e652427ac5ffea7aa56afc116030b073704 (diff)
downloadredis-d3b59891486643d11208ab4a42f253f79dd09a6a.tar.gz
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.
-rw-r--r--src/aof.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index e30c77f29..06c9a47d5 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -284,6 +284,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. */