@@ -862,11 +862,17 @@ int primaryTryPartialResynchronization(client *c, long long psync_offset) {
862862 /* We still have the data our replica is asking for? */
863863 if (!server .repl_backlog || psync_offset < server .repl_backlog -> offset ||
864864 psync_offset > (server .repl_backlog -> offset + server .repl_backlog -> histlen )) {
865- serverLog (LL_NOTICE ,
866- "Unable to partial resync with replica %s for lack of backlog (Replica request was %s:%lld, "
867- "and I can only reply with the range [%lld, %lld])." ,
868- replicationGetReplicaName (c ), primary_replid , psync_offset , server .repl_backlog -> offset ,
869- server .repl_backlog -> offset + server .repl_backlog -> histlen );
865+ if (!server .repl_backlog ) {
866+ serverLog (LL_NOTICE ,
867+ "Unable to partial resync with replica %s for lack of backlog (Replica request was: %s:%lld)." ,
868+ replicationGetReplicaName (c ), primary_replid , psync_offset );
869+ } else {
870+ serverLog (LL_NOTICE ,
871+ "Unable to partial resync with replica %s for lack of backlog (Replica request was %s:%lld, "
872+ "and I can only reply with the range [%lld, %lld])." ,
873+ replicationGetReplicaName (c ), primary_replid , psync_offset , server .repl_backlog -> offset ,
874+ server .repl_backlog -> offset + server .repl_backlog -> histlen );
875+ }
870876 if (psync_offset > server .primary_repl_offset ) {
871877 serverLog (LL_WARNING ,
872878 "Warning: replica %s tried to PSYNC with an offset (%lld) that is greater than "
0 commit comments