diff --git a/src/replication.c b/src/replication.c index 6be5d2631..97ce9608d 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1531,6 +1531,11 @@ int slaveTryPartialResynchronization(int fd, int read_reply) { /* Setup the replication to continue. */ sdsfree(reply); replicationResurrectCachedMaster(fd); + + /* If this instance was restarted and we read the metadata to + * PSYNC from the persistence file, our replication backlog could + * be still not initialized. Create it. */ + if (server.repl_backlog == NULL) createReplicationBacklog(); return PSYNC_CONTINUE; }