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

Binlog Router replication breaks without semi-sync set on Primary

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 23.02.2
    • N/A
    • binlogrouter
    • None
    • Debian Buster

    Description

      I'm running MaxScale 23.02.2 and it's connected to a Mariadb 10.3.38. Both hosts are on Debian Buster.

      If rpl_semi_sync_master_enabled is set to false on the primary, replication between MaxScale's binlogrouter and the primary will break within 5 minutes.

      2023-07-21 10:57:02   error  : (binlogservice); Error received during replication from 'primary:3306': Failed to fetch binlog event from master:
      

      2023-07-21 17:58:02 86422 [Warning] Aborted connection 86422 to db: 'unconnected' user: 'user' host: 'maxscale' (Got an error writing communication packets)
      

      If I enable rpl_semi_sync_master_enabled, replication works as expected.

      The Binlogrouter docs state that semi-sync isn't supported.

      My MaxScale config looks like this.

      [maxscale]
      threads = auto
       
      [binlogservice]
      type=service
      router=binlogrouter
      servers=master
      user=user
      password=password
      server_id=3489044470
      datadir=/data/binlogs
      expire_log_duration=72h
      expire_log_minimum_files=3
      net_timeout=30s
       
      [master]
      type=server
      address=192.168.1.1
      port=3306
      protocol=MariaDBBackend
       
      [binloglistener]
      type=listener
      service=binlogservice
      protocol=mariadbprotocol
      port=3306
      address=0.0.0.0
       
      [replicationmonitor]
      type=monitor
      module=mariadbmon
      servers=master
      user=user
      password=password
      monitor_interval=2000ms
      

      The primary's settings are almost entirely the default

      MariaDB [(none)]> show variables like '%binl%';
      +-----------------------------------------+------------------------------+
      | Variable_name                           | Value                        |
      +-----------------------------------------+------------------------------+
      | binlog_annotate_row_events              | ON                           |
      | binlog_cache_size                       | 32768                        |
      | binlog_checksum                         | CRC32                        |
      | binlog_commit_wait_count                | 0                            |
      | binlog_commit_wait_usec                 | 100000                       |
      | binlog_direct_non_transactional_updates | OFF                          |
      | binlog_file_cache_size                  | 16384                        |
      | binlog_format                           | ROW                          |
      | binlog_optimize_thread_scheduling       | ON                           |
      | binlog_row_image                        | FULL                         |
      | binlog_stmt_cache_size                  | 32768                        |
      | encrypt_binlog                          | OFF                          |
      | gtid_binlog_pos                         | 0-3489044454-12664560        |
      | gtid_binlog_state                       | 0-1-44,0-3489044454-12664560 |
      | innodb_locks_unsafe_for_binlog          | OFF                          |
      | max_binlog_cache_size                   | 18446744073709547520         |
      | max_binlog_size                         | 104857600                    |
      | max_binlog_stmt_cache_size              | 18446744073709547520         |
      | read_binlog_speed_limit                 | 0                            |
      | sync_binlog                             | 0                            |
      | wsrep_forced_binlog_format              | NONE                         |
      +-----------------------------------------+------------------------------+
      21 rows in set (0.002 sec)
      MariaDB [(none)]> show variables like '%repl%';
      +----------------------------------+-----------+
      | Variable_name                    | Value     |
      +----------------------------------+-----------+
      | innodb_replication_delay         | 0         |
      | replicate_annotate_row_events    | ON        |
      | replicate_do_db                  |           |
      | replicate_do_table               |           |
      | replicate_events_marked_for_skip | REPLICATE |
      | replicate_ignore_db              |           |
      | replicate_ignore_table           |           |
      | replicate_wild_do_table          |           |
      | replicate_wild_ignore_table      |           |
      | skip_parallel_replication        | OFF       |
      | skip_replication                 | OFF       |
      | wsrep_mysql_replication_bundle   | 0         |
      | wsrep_replicate_myisam           | OFF       |
      +----------------------------------+-----------+
      13 rows in set (0.002 sec)
      

      MariaDB [(none)]> show variables like '%rpl%';
      +---------------------------------------+--------------+
      | Variable_name                         | Value        |
      +---------------------------------------+--------------+
      | rpl_semi_sync_master_enabled          | OFF          |
      | rpl_semi_sync_master_timeout          | 10000        |
      | rpl_semi_sync_master_trace_level      | 32           |
      | rpl_semi_sync_master_wait_no_slave    | ON           |
      | rpl_semi_sync_master_wait_point       | AFTER_COMMIT |
      | rpl_semi_sync_slave_delay_master      | OFF          |
      | rpl_semi_sync_slave_enabled           | OFF          |
      | rpl_semi_sync_slave_kill_conn_timeout | 5            |
      | rpl_semi_sync_slave_trace_level       | 32           |
      +---------------------------------------+--------------+
      

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              js.bell Jonathan Bell
              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.