Repository navigation
Conversation
Rpl_semi_sync_slave_send_ack is a single global counter, but slave_start() runs once per master connection and resets it to 0 unconditionally. With multi-source replication, starting one connection's I/O thread wiped the ACKs already counted by other still-running connections. Remove the reset from slave_start(). Like every other semi-sync status counter, this variable is now cumulative and no longer cleared when an individual connection's I/O thread starts. Add a test to suite/rpl. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
LGTM. Please stand by for the final review.
bnestere
left a comment
There was a problem hiding this comment.
Hi @FarihaIS !
Thank you for submitting this patch, though I'm not so sure we want to do this. Where the original report is a bug, this change makes it so the counter will never reset on a slave restart. I imagine the overall fix for this will be more akin to MDEV-40941, which will likely move many of these semi-sync counters/variables to be per-channel rather than global.
But with that said, semi-sync replication has much deeper & more important problems to fix (which are unfortunately not beginner friendly).
@ParadoxV5 do you have any thoughts here? I lean towards leaving this as-is in GA (I don't imagine many people encounter it, as no other users have reported this).
Yeah, if
Yeah, this has the same situation as in #5615 (comment). I wonder if there’s a creative compromise for maintenance versions. |
Description
START SLAVEzeroed the globalRpl_semi_sync_slave_send_ackstatus variable even when another multi-source connection was already active and had accumulated ACKs.Rpl_semi_sync_slave_send_ackis a single global counter, butslave_start()runs once per master connection and resets it to0unconditionally. With multi-source replication, starting one connection's I/O thread wiped the ACKs already counted by other still-running connections.Remove the reset from
slave_start(). Like every other semi-sync status counter, this variable is now cumulative and no longer cleared when an individual connection's I/O thread starts.Add a test to
suite/rpl.Release Notes
N/A
How can this PR be tested?
Execute the rpl suite in mysql-test-run.
This commit adds
rpl.rpl_semi_sync_slave_send_ack, which sets up a slave with two master connections (''andother), lets the''connection send semi-sync ACKs, then starts theotherconnection's I/O thread and checks that the counter is preserved.Before the fix
Running
rpl.rpl_semi_sync_slave_send_ackfails as below:After the fix
Running
rpl.rpl_semi_sync_slave_send_acksucceeds:Basing the PR against the correct MariaDB version
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.