summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2019-03-01 17:29:19 +0100
committerGitHub <noreply@github.com>2019-03-01 17:29:19 +0100
commitb19e8b9a2c84694cd2586983a260ae6dc36afc86 (patch)
tree02a45e60fab6451e39450a8ffda2aa5c7002bfc9 /src
parent80b8f9febcc025073076becceaf0bf8bcf0c4bac (diff)
parent8f7e97258b0b71b907a67b3078fe6374c77b9972 (diff)
downloadredis-b19e8b9a2c84694cd2586983a260ae6dc36afc86.tar.gz
Merge pull request #5875 from chendq8/partialsync
fix:Slave will do full sync when restart with SHUTDOWN SAVE on cluster mode
Diffstat (limited to 'src')
-rw-r--r--src/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index 7234142d7..9de579815 100644
--- a/src/server.c
+++ b/src/server.c
@@ -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