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

Semi-sync Breaks with @@skip_replication=1

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      In a semi-sync replication topology with the slave configured with --replicate-events-marked-for-skip=FILTER_ON_SLAVE, when the master skips any transactions with @@skip_replicate=1, these transactions hang the server waiting for an ACK which can never come.

      Consider the following MTR test case and opt file:

      -master.opt file:

      --replicate-events-marked-for-skip=filter_on_master
      

      MTR file:

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      --connection master
      set @@global.rpl_semi_sync_master_timeout= 2000; # 2s
      set @@global.rpl_semi_sync_master_enabled=1;
       
      --connection slave
      --source include/stop_slave.inc
      set @old_enabled= @@global.rpl_semi_sync_slave_enabled;
      set @@global.rpl_semi_sync_slave_enabled=1;
      --source include/start_slave.inc
       
      --connection master
      --let $master_ss_status= query_get_value(SHOW STATUS LIKE 'rpl_semi_sync_master_status', Value, 1)
      if (`SELECT strcmp("$master_ss_status", "ON") != 0`)
      {
        SHOW STATUS LIKE 'rpl_semi_sync_master_status';
        --die rpl_semi_sync_master_status should be ON to start
      }
       
      --echo #
      --echo # Initialize test data (this is ACKed)
      --connection master
      create table t1 (a int);
      insert into t1 values (1);
      --source include/save_master_gtid.inc
       
      --connection slave
      --source include/sync_with_master_gtid.inc
       
      --echo # And now a skipped event
      --connection master
      set @old_skip_replication= @@session.skip_replication;
      set session skip_replication=1;
      create database db_ignore;
      set session skip_replication= @old_skip_replication;
      

      The create database db_ignore hangs waiting for an ACK.

      The correct behavior would be for transactions to not await ACKs when they are binlogged with `skip_replicate`.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              bnestere Brandon Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.