Commit 1a54d596 authored by antirez's avatar antirez
Browse files

Refresh good slaves count when setting slave state as online.

parent d64d2e21
...@@ -441,6 +441,7 @@ int masterTryPartialResynchronization(redisClient *c) { ...@@ -441,6 +441,7 @@ int masterTryPartialResynchronization(redisClient *c) {
* to -1 to force the master to emit SELECT, since the slave already * to -1 to force the master to emit SELECT, since the slave already
* has this state from the previous connection with the master. */ * has this state from the previous connection with the master. */
refreshGoodSlavesCount();
return REDIS_OK; /* The caller can return, no full resync needed. */ return REDIS_OK; /* The caller can return, no full resync needed. */
need_full_resync: need_full_resync:
...@@ -662,6 +663,7 @@ void sendBulkToSlave(aeEventLoop *el, int fd, void *privdata, int mask) { ...@@ -662,6 +663,7 @@ void sendBulkToSlave(aeEventLoop *el, int fd, void *privdata, int mask) {
freeClient(slave); freeClient(slave);
return; return;
} }
refreshGoodSlavesCount();
redisLog(REDIS_NOTICE,"Synchronization with slave succeeded"); redisLog(REDIS_NOTICE,"Synchronization with slave succeeded");
} }
} }
......
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