Skip to content

Commit

Permalink
MDEV-25580: rpl.rpl_semi_sync_slave_compressed_protocol crashes becau…
Browse files Browse the repository at this point in the history
…se 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>
  • Loading branch information
bnestere committed Mar 24, 2022
1 parent bbf02c8 commit 32ab621
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sql/semisync_master.cc
Expand Up @@ -1229,6 +1229,7 @@ int Repl_semi_sync_master::flush_net(THD *thd,

net_clear(net, 0);
net->pkt_nr++;
net->compress_pkt_nr++;
result = 0;
rpl_semi_sync_master_net_wait_num++;

Expand Down

0 comments on commit 32ab621

Please sign in to comment.