Skip to content

Commit 1dcf702

Browse files
author
gd.zhou
committed
[hotfix] exec gtidSeqTrim function when server.repl_backlog->offset change
1 parent 23063ac commit 1dcf702

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/replication.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ void incrementalTrimReplicationBacklog(size_t max_blocks) {
368368
/* Set the offset of the first byte we have in the backlog. */
369369
server.repl_backlog->offset = server.master_repl_offset -
370370
server.repl_backlog->histlen + 1;
371+
/* gtid_seq trim to repl_backlog->offset */
372+
if (server.gtid_seq != NULL) gtidSeqTrim(server.gtid_seq,server.repl_backlog->offset);
373+
371374
}
372375

373376
/* Free replication buffer blocks that are referenced by this client. */

0 commit comments

Comments
 (0)