Skip to content

Commit 32ab621

Browse files
committed
MDEV-25580: rpl.rpl_semi_sync_slave_compressed_protocol crashes because of wrong packet
Problem: ======== When both semi-sync and slave compression are enabled, the numbering on packet headers can become out of sync between the primary and replica servers. More specifically, after the master flushes its write, it should increment the counters that track packets. The bug is such that the master only updates the normal packet counter and leaves the compressed packet counter alone. Solution: ======== After the master flushes, additionally increment the compressed packet counter. Reviewed By: ============ Andrei Elkin: <andrei.elkin@mariadb.com>
1 parent bbf02c8 commit 32ab621

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sql/semisync_master.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,7 @@ int Repl_semi_sync_master::flush_net(THD *thd,
12291229

12301230
net_clear(net, 0);
12311231
net->pkt_nr++;
1232+
net->compress_pkt_nr++;
12321233
result = 0;
12331234
rpl_semi_sync_master_net_wait_num++;
12341235

0 commit comments

Comments
 (0)