Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11853

semisync thread can be killed after sync binlog but before ACK in the sync state

Details

    Description

      Shutdown of master in semisync when it's in sync can let more transactions in the master than the slaves.
      This is expected in case of a crash as the binlog write before send and wait for the ACK. But this is an issue in case of regular shutdown, as the workload can not be safely be moved to a slave.

      We can make sure the semi sync thread is killed last in shutdown and stopped only if status move to no sync or after receiving the ACK , this would possibly delay shutdown for the maximum time of the rpl_semi_sync_master_timeout

      Attachments

        Issue Links

          Activity

            Elkin Andrei Elkin added a comment -

            MDEV-18450 has partly fixed this issue. The remained work is to further delay the master shutdown until either an ack
            arrives or rpl_semi_sync_master_timeout elapses.

            Elkin Andrei Elkin added a comment - MDEV-18450 has partly fixed this issue. The remained work is to further delay the master shutdown until either an ack arrives or rpl_semi_sync_master_timeout elapses.

            Hi Andrei!

            This is ready for review.

            GH: 515dc59
            BB: bb-10.4-MDEV-11853

            bnestere Brandon Nesterenko added a comment - Hi Andrei! This is ready for review. GH: 515dc59 BB: bb-10.4-MDEV-11853
            Elkin Andrei Elkin added a comment -

            Analyzed the issue & the current patch to request some improvements.

            Elkin Andrei Elkin added a comment - Analyzed the issue & the current patch to request some improvements.

            Hi Andrei! My new patch is ready for review:

            Patch: 55ec699
            BB: bb-10.4-MDEV-11853

            It addresses previous review remarks, as well as MDEV-28141. Particularly, test case 5 is the MTR test case which would reproduce the packets out of order problem (when built with -DEXTRA_DEBUG); and my comment here highlights its fix.

            bnestere Brandon Nesterenko added a comment - Hi Andrei! My new patch is ready for review: Patch: 55ec699 BB: bb-10.4-MDEV-11853 It addresses previous review remarks, as well as MDEV-28141 . Particularly, test case 5 is the MTR test case which would reproduce the packets out of order problem (when built with -DEXTRA_DEBUG); and my comment here highlights its fix.
            Elkin Andrei Elkin added a comment -

            MDEV-11853 fixes are approved.

            Elkin Andrei Elkin added a comment - MDEV-11853 fixes are approved.

            Note that mysqld.cc will have a merge conflict in 10.7.

            Fix branch: 10.7-MDEV-11853-merge

            Fix patch: 71c3725

            bnestere Brandon Nesterenko added a comment - Note that mysqld.cc will have a merge conflict in 10.7. Fix branch: 10.7-MDEV-11853-merge Fix patch: 71c3725

            People

              bnestere Brandon Nesterenko
              stephane@skysql.com VAROQUI Stephane
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.