diff options
author | antirez <antirez@gmail.com> | 2018-10-09 11:51:04 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-10 11:14:23 +0200 |
commit | 3a91fcbcf36479af110e6ceb43a86569659930ad (patch) | |
tree | 434408903251eefc95db33d237b129fdb5d9c10b | |
parent | e6f287d59f2054c85d691ed7b279f09c91695e45 (diff) | |
download | redis-3a91fcbcf36479af110e6ceb43a86569659930ad.tar.gz |
aof.c: improve indentation and change warning message.
Related to #5201.
I removed the !!! Warning part since compared to the other errors, a
missing EXEC is in theory a normal happening in the AOF file, at least
in theory: may happen in a differnet number of situations, and it's
probably better to don't give the user the feeling that something really
bad happened.
-rw-r--r-- | src/aof.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -778,7 +778,9 @@ int loadAppendOnlyFile(char *filename) { /* Command lookup */ cmd = lookupCommand(argv[0]->ptr); if (!cmd) { - serverLog(LL_WARNING,"Unknown command '%s' reading the append only file", (char*)argv[0]->ptr); + serverLog(LL_WARNING, + "Unknown command '%s' reading the append only file", + (char*)argv[0]->ptr); exit(1); } @@ -786,14 +788,18 @@ int loadAppendOnlyFile(char *filename) { /* Run the command in the context of a fake client */ fakeClient->cmd = cmd; - if (fakeClient->flags & CLIENT_MULTI && fakeClient->cmd->proc != execCommand) { + if (fakeClient->flags & CLIENT_MULTI && + fakeClient->cmd->proc != execCommand) + { queueMultiCommand(fakeClient); } else { cmd->proc(fakeClient); } /* The fake client should not have a reply */ - serverAssert(fakeClient->bufpos == 0 && listLength(fakeClient->reply) == 0); + serverAssert(fakeClient->bufpos == 0 && + listLength(fakeClient->reply) == 0); + /* The fake client should never get blocked */ serverAssert((fakeClient->flags & CLIENT_BLOCKED) == 0); @@ -809,7 +815,8 @@ int loadAppendOnlyFile(char *filename) { * a short read, even if technically the protocol is correct: we want * to remove the unprocessed tail and continue. */ if (fakeClient->flags & CLIENT_MULTI) { - serverLog(LL_WARNING,"!!! Warning: we lost EXEC in the middle of transaction, discard !!!"); + serverLog(LL_WARNING, + "Revert incomplete MULTI/EXEC transaction in AOF file"); valid_up_to = valid_before_multi; goto uxeof; } |