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

            stephane@skysql.com VAROQUI Stephane created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Fix Version/s 10.2 [ 14601 ]
            Assignee Lixun Peng [ plinux ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Assignee Lixun Peng [ plinux ] Andrei Elkin [ elkin ]
            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.
            Elkin Andrei Elkin made changes -
            Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
            bnestere Brandon Nesterenko made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 79294 ] MariaDB v4 [ 144456 ]

            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
            bnestere Brandon Nesterenko made changes -
            Assignee Brandon Nesterenko [ JIRAUSER48702 ] Andrei Elkin [ elkin ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            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.
            Elkin Andrei Elkin made changes -
            Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            bnestere Brandon Nesterenko made changes -
            bnestere Brandon Nesterenko made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            bnestere Brandon Nesterenko made changes -

            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.
            bnestere Brandon Nesterenko made changes -
            Assignee Brandon Nesterenko [ JIRAUSER48702 ] Andrei Elkin [ elkin ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            Elkin Andrei Elkin made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.2 [ 14601 ]
            Elkin Andrei Elkin added a comment -

            MDEV-11853 fixes are approved.

            Elkin Andrei Elkin added a comment - MDEV-11853 fixes are approved.
            Elkin Andrei Elkin made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]

            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
            bnestere Brandon Nesterenko made changes -
            issue.field.resolutiondate 2022-04-22 21:50:49.0 2022-04-22 21:50:49.628
            bnestere Brandon Nesterenko made changes -
            Fix Version/s 10.4.25 [ 27510 ]
            Fix Version/s 10.5.16 [ 27508 ]
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.4 [ 22408 ]
            Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
            Roel Roel Van de Paar made changes -

            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.