Skip to content

Commit 98ad37b

Browse files
committed
fix: create replbuffer before we start feed
Signed-off-by: arthur.lee <[email protected]>
1 parent 462e1f5 commit 98ad37b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/aof.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,7 @@ int loadSingleAppendOnlyFile(char *filename) {
14811481
/* If this is a primary, we can save the replication info
14821482
* as secondary ID and offset, in order to allow replicas
14831483
* to partial resynchronizations with primaries. */
1484+
if (server.repl_backlog == NULL) createReplicationBacklog();
14841485
memcpy(server.replid2, rsi.repl_id, sizeof(server.replid));
14851486
server.second_replid_offset = rsi.repl_offset + 1;
14861487
/* Rebase primary_repl_offset from rsi.repl_offset. */

0 commit comments

Comments
 (0)