Skip to content

Commit

Permalink
Merge pull request redis#5875 from chendq8/partialsync
Browse files Browse the repository at this point in the history
fix:Slave will do full sync when restart with SHUTDOWN SAVE on cluster mode
  • Loading branch information
antirez authored Mar 1, 2019
2 parents 80b8f9f + 8f7e972 commit b19e8b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -4556,7 +4556,7 @@ void loadDataFromDisk(void) {
(float)(ustime()-start)/1000000);

/* 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_offset != -1 &&
/* Note that older implementations may save a repl_stream_db
Expand Down

0 comments on commit b19e8b9

Please sign in to comment.