Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4668

Binlogrouter eventually stops working if semi-sync replication is not used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 23.02.2
    • 23.02.4
    • binlogrouter
    • None
    • MXS-SPRINT-187, MXS-SPRINT-188

    Description

      The binlogrouter will eventually stop replicating with an error that has no error message. This only happens if semi-sync replication is not configured for the server from which the binlogrouter is replicating from. This happens due to CONC-659 where the connector always assumes that the two bytes of semi-sync information are sent.


      Original description:
      I try the binlog router with MariaDB Enterprise 10.6.14. Eventually it stops reading binlog events from the master:

      MaxScale log:
      2023-07-08 12:39:11   error  : (Replication-Proxy); Error received during replication from '172.31.1.142:3306': Failed to fetch binlog event from master: 
      2023-07-08 12:39:13   error  : (Replication-Proxy); Error received during replication from '172.31.1.142:3306': Failed to fetch binlog event from master: 
      ...
      

      MariaDB [(none)]> show slave status\G
      *************************** 1. row ***************************
                      Slave_IO_State: Reconnecting after a failed primary event read
                         Master_Host: 172.31.1.142
                         Master_User: xxxxxx
                         Master_Port: 3306
                       Connect_Retry: 1
                     Master_Log_File: mariadb-bin.000001
                 Read_Master_Log_Pos: 2756715
      ...
                          Last_Errno: -1
                          Last_Error: Failed to fetch binlog event from master: 
      ...
                         Gtid_IO_Pos: 0-18334-2749960
      ...
      

      The binlog from MaxScale ends with the COMMIT for GTID 0-18334-2749960 and fails with the next GTID being announced at position 2756805 in mariadb-bin.000009.

      The last good binlog event and the failed one decoded:

      mysqlbinlog --start-position=2756774 --stop-position=2756847 --hexdump /data/clustrix/mariadb/mariadb-bin.000009
       
      # at 2756774
      #230708 12:39:10 server id 18334  end_log_pos 2756805 CRC32 0x6c726826
      # Position
      #           |Timestamp   |Type |Master ID   |Size        |Master Pos  |Flags
      #   2a10a6  |ee 58 a9 64 |10   |9e 47 00 00 |1f 00 00 00 |c5 10 2a 00 |00 00
      #
      #   2a10b9  fb 4b 55 03 00 00 00 00  26 68 72 6c              |.KU.....&hrl|
      #
      # Event:        Xid = 55921659
      COMMIT/*!*/;
      # at 2756805
      #230708 12:39:11 server id 18334  end_log_pos 2756847 CRC32 0x286242e3
      # Position
      #           |Timestamp   |Type |Master ID   |Size        |Master Pos  |Flags
      #   2a10c5  |ef 58 a9 64 |a2   |9e 47 00 00 |2a 00 00 00 |ef 10 2a 00 |08 00
      #
      #   2a10d8  09 f6 29 00 00 00 00 00  00 00 00 00 0c 00 00 00  |..).............|
      #   2a10e8  00 00 00 e3 42 62 28                              |....Bb(|
      #
      # Event:        GTID 0-18334-2749961 trans
      /*!100001 SET @@session.gtid_seq_no=2749961*//*!*/;
      START TRANSACTION
      /*!*/;
      DELIMITER ;
      # End of log file
      

      Attached:

      • my.cnf from master
      • maxscale.cnf
      • maxscale log
      • the maxscale copy of the binlog

      Attachments

        1. BLR10.png
          14 kB
          Axel Schwenke
        2. BLR20.png
          14 kB
          Axel Schwenke
        3. mariadb-bin.000001.gz
          832 kB
          Axel Schwenke
        4. master.my.cnf
          2 kB
          Axel Schwenke
        5. maxscale.cnf
          0.5 kB
          Axel Schwenke
        6. maxscale.log
          395 kB
          Axel Schwenke

        Issue Links

          Activity

            People

              markus makela markus makela
              axel Axel Schwenke
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.