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

LP:872754 - Annotate rows events on slave doesnt' work without slave's binlog

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.0
    • Component/s: None
    • Labels:

      Description

      master: --binlog_annotate_rows_log_events
      slave: --slave_annotate_rows_log_event --log_slave_updates=0

      slave fails with error:
      [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master', Error_code: 1236

      if master idle more than --slave_net_timeout.

      Test-case in attachment.

      I investigated it, and found the following:
      1) master doesn't replicate Annotate_rows_log_event to slave if one of the following is true:
      a) --replicate_annotate_rows_event is OFF
      b) --log_slave_updates is OFF
      2) While slave executes events, it calculates mi->master_log_pos (Exec_Master_Log_Pos).
      If master doesn't replicate Annotate_rows_log_event to slave, mi->master_log_pos is incorrect (less than log_pos-on-master to sizeof(Annotate_rows_log_event) that weren't sent from master to slave).
      3) After slave_net_timeout slave reconnects to master and sends mi->master_log_pos to it.
      As a result, master tries to read event from its log from incorrect position.

      Possible fixes:
      1) always replicate Annotate_rows_log_event from master to slave. If you do this, option "--replicate_annotate_rows_events" doesn't have sense (always true) and should be removed
      2) fix the Master Dump Thread - when "-replicate_annotate_rows_events" disabled or slave run with "log_slave_updates=0", master should notify slave about skipped events (probably as filtered event or send Rotate_log_event ) I don't sure what this is possible or correct fix (just idea)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            olegtsarev Oleg Tsarev added a comment -

            Re: Annotate rows events on slave doesnt' work without slave's binlog

            Show
            olegtsarev Oleg Tsarev added a comment - Re: Annotate rows events on slave doesnt' work without slave's binlog
            Hide
            olegtsarev Oleg Tsarev added a comment -

            Test-case for MariaDB
            unworkable_annotate_rows_event.tar
            LPexportBug872754_unworkable_annotate_rows_event.tar

            Show
            olegtsarev Oleg Tsarev added a comment - Test-case for MariaDB unworkable_annotate_rows_event.tar LPexportBug872754_unworkable_annotate_rows_event.tar
            Hide
            olegtsarev Oleg Tsarev added a comment -

            Re: Annotate rows events on slave doesnt' work without slave's binlog
            Test-case for MariaDB

            Show
            olegtsarev Oleg Tsarev added a comment - Re: Annotate rows events on slave doesnt' work without slave's binlog Test-case for MariaDB
            Hide
            olegtsarev Oleg Tsarev added a comment -

            Test-case for Percona-Server rnt-5.1
            unworkable_replicate_annotate_rows_events.tar
            LPexportBug872754_unworkable_replicate_annotate_rows_events.tar

            Show
            olegtsarev Oleg Tsarev added a comment - Test-case for Percona-Server rnt-5.1 unworkable_replicate_annotate_rows_events.tar LPexportBug872754_unworkable_replicate_annotate_rows_events.tar
            Hide
            olegtsarev Oleg Tsarev added a comment -

            Re: Annotate rows events on slave doesnt' work without slave's binlog
            Test-case for Percona-Server rnt-5.1

            Show
            olegtsarev Oleg Tsarev added a comment - Re: Annotate rows events on slave doesnt' work without slave's binlog Test-case for Percona-Server rnt-5.1
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Annotate rows events on slave doesnt' work without slave's binlog
            I think this will be fixed in mariadb when MWL#234 is merged.

            Show
            knielsen Kristian Nielsen added a comment - Re: Annotate rows events on slave doesnt' work without slave's binlog I think this will be fixed in mariadb when MWL#234 is merged.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 872754

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 872754
            Hide
            knielsen Kristian Nielsen added a comment -

            This is fixed in 10.0.

            If master chooses not to send the annotate event, and the slave is an old MariaDB or MySQL server that will get confused about "holes" in the event stream sent, then a dummy event (empty query event containing just a comment) is sent instead.

            Show
            knielsen Kristian Nielsen added a comment - This is fixed in 10.0. If master chooses not to send the annotate event, and the slave is an old MariaDB or MySQL server that will get confused about "holes" in the event stream sent, then a dummy event (empty query event containing just a comment) is sent instead.

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                olegtsarev Oleg Tsarev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: