Browse files

Partial fix for a problem with AOF and BRPOP. We have at least a sing…

…le 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.
  • Loading branch information...
1 parent a2d68e6 commit d3b59891486643d11208ab4a42f253f79dd09a6a @antirez committed Jun 29, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 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. */

0 comments on commit d3b5989

Please sign in to comment.