Commit 8f63ddca authored by antirez's avatar antirez
Browse files

AOF is now rewritten on slave after SYNC with master. Thanks to @_km for...

AOF is now rewritten on slave after SYNC with master. Thanks to @_km for finding this bug and any others'
parent cbb87f7f
......@@ -622,6 +622,7 @@ static void freePubsubPattern(void *p);
static int listMatchPubsubPattern(void *a, void *b);
static int compareStringObjects(robj *a, robj *b);
static void usage();
static int rewriteAppendOnlyFileBackground(void);
static void authCommand(redisClient *c);
static void pingCommand(redisClient *c);
......@@ -1516,6 +1517,7 @@ static int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientD
redisLog(REDIS_NOTICE,"Connecting to MASTER...");
if (syncWithMaster() == REDIS_OK) {
redisLog(REDIS_NOTICE,"MASTER <-> SLAVE sync succeeded");
if (server.appendonly) rewriteAppendOnlyFileBackground();
}
}
return 100;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment