mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge pull request #4607 from oranagra/psync2_backlog
PSYNC2 fix - promoted slave should hold on to it's backlog
This commit is contained in:
commit
0cc43760d7
@ -1970,6 +1970,11 @@ void replicationUnsetMaster(void) {
|
|||||||
* with PSYNC version 2, there is no need for full resync after a
|
* with PSYNC version 2, there is no need for full resync after a
|
||||||
* master switch. */
|
* master switch. */
|
||||||
server.slaveseldb = -1;
|
server.slaveseldb = -1;
|
||||||
|
|
||||||
|
/* We need to remember the time when we became a master and lost all
|
||||||
|
* attached slaves (if we had any), as after some time we'll free the
|
||||||
|
* replication backlog. */
|
||||||
|
server.repl_no_slaves_since = server.unixtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is called when the slave lose the connection with the
|
/* This function is called when the slave lose the connection with the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user