mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
fix replicationid will not change for server.masterhost==NULL in cluster mode when restart slave
This commit is contained in:
parent
49816941a4
commit
8f7e97258b
@ -4556,7 +4556,7 @@ void loadDataFromDisk(void) {
|
|||||||
(float)(ustime()-start)/1000000);
|
(float)(ustime()-start)/1000000);
|
||||||
|
|
||||||
/* Restore the replication ID / offset from the RDB file. */
|
/* Restore the replication ID / offset from the RDB file. */
|
||||||
if (server.masterhost &&
|
if ((server.masterhost || (server.cluster_enabled && nodeIsSlave(server.cluster->myself)))&&
|
||||||
rsi.repl_id_is_set &&
|
rsi.repl_id_is_set &&
|
||||||
rsi.repl_offset != -1 &&
|
rsi.repl_offset != -1 &&
|
||||||
/* Note that older implementations may save a repl_stream_db
|
/* Note that older implementations may save a repl_stream_db
|
||||||
|
Loading…
x
Reference in New Issue
Block a user