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

[PATCH] mysqldump --dump-slave always starts stopped slave

Details

    Description

      When making a dump with --dump-slave option, upon completion mysqldump starts slave threads even if they were not stopped by mysqldump itself. This behavior breaks delayed/manually synchronized slaves which have not to be running all the time. Please consider implementing additional check(s) for that, like in the attached patch.

      P.S. The comment /* if SLAVE SQL is not running, we don't start it */ in do_start_slave_sql() is opposite and misleading.

      Attachments

        Activity

          smax Max Samoilenko created issue -
          smax Max Samoilenko made changes -
          Field Original Value New Value
          Description When making a dump with --dump-slave option, upon completion mysqldump starts slave threads even if they were not stopped by mysqldump itself. This behavior breaks delayed/manually synchronized slaves which have not be running all the time. Please consider implementing additional check(s) for that, like in the attached patch. When making a dump with --dump-slave option, upon completion mysqldump starts slave threads even if they were not stopped by mysqldump itself. This behavior breaks delayed/manually synchronized slaves which have not to be running all the time. Please consider implementing additional check(s) for that, like in the attached patch.

          P.S. The comment /* if SLAVE SQL is not running, we don't start it */ in do_start_slave_sql() is opposite and misleading.
          elenst Elena Stepanova made changes -
          Component/s OTHER [ 10125 ]
          Fix Version/s 10.0 [ 16000 ]
          Fix Version/s 5.5 [ 15800 ]
          Affects Version/s 10.0 [ 16000 ]
          Affects Version/s 5.5 [ 15800 ]
          Affects Version/s 10.0.16 [ 17900 ]
          Labels upstream verified
          Priority Trivial [ 5 ] Minor [ 4 ]
          Summary mysqldump --dump-slave always starts stopped slave [PATCH] mysqldump --dump-slave always starts stopped slave
          elenst Elena Stepanova made changes -

          smax,

          Thanks for the report and the patch.

          serg,

          Technically it's an upstream bug, but it's been in 'verified' for 3 years with no progress, maybe it makes sense not to wait and just to apply the patch?

          elenst Elena Stepanova added a comment - smax , Thanks for the report and the patch. serg , Technically it's an upstream bug, but it's been in 'verified' for 3 years with no progress, maybe it makes sense not to wait and just to apply the patch?
          elenst Elena Stepanova made changes -
          Assignee Sergei Golubchik [ serg ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 59725 ] MariaDB v3 [ 65759 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 65759 ] MariaDB v4 [ 139772 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0 [ 16000 ]
          robo Robert Oliver added a comment -

          I think this is not an upstream bug anymore.
          Can it be fixed in mariadb-dump now?

          robo Robert Oliver added a comment - I think this is not an upstream bug anymore. Can it be fixed in mariadb-dump now?
          serg Sergei Golubchik made changes -
          Affects Version/s 10.1(EOL) [ 16100 ]
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.11 [ 27614 ]
          Affects Version/s 11.4 [ 29301 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.4 [ 29301 ]
          serg Sergei Golubchik made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Status In Progress [ 3 ] In Review [ 10002 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 5.5(EOL) [ 15800 ]

          Thanks. The patch is fine. It lacks a test case, but we can add it, don't bother.

          bnestere, could you check the whole idea once again? Is it the behavior we want to have?

          serg Sergei Golubchik added a comment - Thanks. The patch is fine. It lacks a test case, but we can add it, don't bother. bnestere , could you check the whole idea once again? Is it the behavior we want to have?
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Brandon Nesterenko [ JIRAUSER48702 ]

          Seems good to me. ParadoxV5, this is a good opportunity to learn a bit about mysqldump. Can you take over for the patch, and create the test case?

          bnestere Brandon Nesterenko added a comment - Seems good to me. ParadoxV5 , this is a good opportunity to learn a bit about mysqldump. Can you take over for the patch, and create the test case?
          bnestere Brandon Nesterenko made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Jimmy Hú [ JIRAUSER55761 ]
          ParadoxV5 Jimmy Hú added a comment -

          Not good.
          It cannot be a single global boolean for multi-source replication (est. MariaDB 10.0).

             /* Loop over all slaves */
            while ((row= mysql_fetch_row(slave)))
          

          This patch (made for 5.5, I presume) is outdated.

          ParadoxV5 Jimmy Hú added a comment - Not good. It cannot be a single global boolean for multi-source replication (est. MariaDB 10.0). /* Loop over all slaves */ while ((row= mysql_fetch_row(slave))) This patch (made for 5.5, I presume) is outdated.
          ParadoxV5 Jimmy Hú made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          ParadoxV5 Jimmy Hú added a comment -

          Hmph, no multi-source mariadb-dump tests either.

          ParadoxV5 Jimmy Hú added a comment - Hmph, no multi-source mariadb-dump tests either.
          ParadoxV5 Jimmy Hú made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          ParadoxV5 Jimmy Hú added a comment -

          https://github.com/MariaDB/server/pull/3780

          I have a question about our internal APIs.
          The rest are ready for review in the meantime.

          ParadoxV5 Jimmy Hú added a comment - https://github.com/MariaDB/server/pull/3780 I have a question about our internal APIs. The rest are ready for review in the meantime.
          ParadoxV5 Jimmy Hú made changes -
          Assignee Jimmy Hú [ JIRAUSER55761 ] Brandon Nesterenko [ JIRAUSER48702 ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          bnestere Brandon Nesterenko made changes -
          Component/s Replication [ 10100 ]

          Review done, left a couple notes on the PR

          bnestere Brandon Nesterenko added a comment - Review done, left a couple notes on the PR
          bnestere Brandon Nesterenko made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Jimmy Hú [ JIRAUSER55761 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]

          People

            ParadoxV5 Jimmy Hú
            smax Max Samoilenko
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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