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

[PATCH] Do not put stop events into binlog

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have the attached patch in our MySQL and MariaDB trees that removes the code putting stop events into binlog. The reasoning for removing these events is:

      1. The slave takes no action in response to the event so it isn't needed to begin with.
      2. If the master and slave are running with different binlog formats, the slave writes the stop event in its format while the rest of the events in the relay logs are of the master's format. This can cause the SQL thread to explode when it tries to read the stop event.
      3. If the master is generating an ID sequence we do not want the stop event to consume an ID.

      Could you consider including this patch into MariaDB?

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment - - edited

            I do not understand the rationale for this patch:

            > 2. If the master and slave are running with different binlog formats, the
            > slave writes the stop event in its format while the rest of the events in
            > the relay logs are of the master's format. This can cause the SQL thread to
            > explode when it tries to read the stop event.

            I do not understand "different format"? As far as I know, the stop event is
            always in the same format in MariaDB (I know only of statement vs. row format,
            which applies only to query events).

            Can you explain how to make the "SQL thread to explode" on stop event in
            MariaDB?

            > 3. If the master is generating an ID sequence we do not want the stop event
            > to consume an ID.

            In MariaDB GTID, IDs are generated only for GTID events, not for STOP or any
            other event.

            It sounds to me like this is related to the Google patch for global
            transaction ID. Where an ID is added to every event (hence 3). And where
            perhaps this adding of ID or not can be enabled/disabled? Hence (2).

            But this does not apply to MariaDB. Global transaction ID is always enabled,
            and it only affects the new GTID events, so no different formats of events.

            /me confused ...

            Show
            knielsen Kristian Nielsen added a comment - - edited I do not understand the rationale for this patch: > 2. If the master and slave are running with different binlog formats, the > slave writes the stop event in its format while the rest of the events in > the relay logs are of the master's format. This can cause the SQL thread to > explode when it tries to read the stop event. I do not understand "different format"? As far as I know, the stop event is always in the same format in MariaDB (I know only of statement vs. row format, which applies only to query events). Can you explain how to make the "SQL thread to explode" on stop event in MariaDB? > 3. If the master is generating an ID sequence we do not want the stop event > to consume an ID. In MariaDB GTID, IDs are generated only for GTID events, not for STOP or any other event. It sounds to me like this is related to the Google patch for global transaction ID. Where an ID is added to every event (hence 3). And where perhaps this adding of ID or not can be enabled/disabled? Hence (2). But this does not apply to MariaDB. Global transaction ID is always enabled, and it only affects the new GTID events, so no different formats of events. /me confused ...
            Hide
            pivanof Pavel Ivanov added a comment -

            Thank you Kristian for explaining to me what this patch is really about.
            This patch was in our tree for so long that nobody remembered what it's about and how to reproduce the problems it's supposed to fix. Your explanation sounds perfectly reasonable to me and it looks like indeed we don't need the patch in MariaDB tree. So we'll drop it and revisit the issue if something breaks. For now you can close the ticket as Won't Fix.
            Out of curiosity: could you explain what the stop event is originally intended for? What's its purpose?

            Show
            pivanof Pavel Ivanov added a comment - Thank you Kristian for explaining to me what this patch is really about. This patch was in our tree for so long that nobody remembered what it's about and how to reproduce the problems it's supposed to fix. Your explanation sounds perfectly reasonable to me and it looks like indeed we don't need the patch in MariaDB tree. So we'll drop it and revisit the issue if something breaks. For now you can close the ticket as Won't Fix. Out of curiosity: could you explain what the stop event is originally intended for? What's its purpose?

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                pivanof Pavel Ivanov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: