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

MariaDB Galera Cluster does not enforce slave_type_conversions

Details

    Description

      Test case on two node cluster:

      -- On node 1
      set global slave_type_conversions='ALL_LOSSY';
      create table testconv (id int primary key);
      set wsrep_osu_method='RSU';
      alter table testconv modify column id bigint unsigned;
      set wsrep_osu_method='TOI';
      -- On node 2
      insert into testconv values(1);

      Failure on node 1:

      160129  9:51:46 [ERROR] Slave SQL: Column 0 of table 'test.testconv' cannot be converted from type 'int' to type 'bigint(20) unsigned', Internal MariaDB error code: 1677
      160129  9:51:46 [Warning] WSREP: RBR event 3 Write_rows_v1 apply warning: 3, 11
      160129  9:51:46 [Warning] WSREP: Failed to apply app buffer: seqno: 11, status: 1

      Attachments

        Issue Links

          Activity

            This issue also affects traditional replication.

            nirbhay_c Nirbhay Choubey (Inactive) added a comment - This issue also affects traditional replication.
            stemid Stefan Midjich added a comment - - edited

            Not sure if I have the same issue.

            Variable_name Value
            slave_type_conversions  
            wsrep_osu_method TOI

            I was doing an alter table to change varchar(16) to varchar(32) on mariadb 10.1 using innodb. The table was about 50 million lines.

            It was blocking connections so I stupidly aborted the query on master01. Master02 continued the query as system user so I could not kill it.

            I took master01 out of cluster, let master02 continue and was planning on using master02 as donor when it had finished.

            All worked well until progress of alter table query was at around 55.000 and then this error was logged and the node went down.

            After that I had to restore the node with the most recent data with wsrep-new-cluster and restore the cluster.

            {{[ERROR] Slave SQL: Column 7 of table 'netadmin_logging.sla_acct' cannot be converted from type 'varchar(16)' to type 'varchar(32)', Internal MariaDB error code: 1677
            [Warning] WSREP: RBR event 2 Write_rows_v1 apply warning: 3, 65437549
            [Warning] WSREP: Failed to apply app buffer: seqno: 65437549, status: 1
            ...
            [ERROR] WSREP: Node consistency compromized, aborting...}}

            stemid Stefan Midjich added a comment - - edited Not sure if I have the same issue. Variable_name Value slave_type_conversions   wsrep_osu_method TOI I was doing an alter table to change varchar(16) to varchar(32) on mariadb 10.1 using innodb. The table was about 50 million lines. It was blocking connections so I stupidly aborted the query on master01. Master02 continued the query as system user so I could not kill it. I took master01 out of cluster, let master02 continue and was planning on using master02 as donor when it had finished. All worked well until progress of alter table query was at around 55.000 and then this error was logged and the node went down. After that I had to restore the node with the most recent data with wsrep-new-cluster and restore the cluster. {{ [ERROR] Slave SQL: Column 7 of table 'netadmin_logging.sla_acct' cannot be converted from type 'varchar(16)' to type 'varchar(32)', Internal MariaDB error code: 1677 [Warning] WSREP: RBR event 2 Write_rows_v1 apply warning: 3, 65437549 [Warning] WSREP: Failed to apply app buffer: seqno: 65437549, status: 1 ... [ERROR] WSREP: Node consistency compromized, aborting...}}

            Its an expected behavior. The KB entry has been updated to reflect the correct behavior.

            https://mariadb.com/kb/en/mariadb/replication-and-binary-log-server-system-variables/#slave_type_conversions

            nirbhay_c Nirbhay Choubey (Inactive) added a comment - Its an expected behavior. The KB entry has been updated to reflect the correct behavior. https://mariadb.com/kb/en/mariadb/replication-and-binary-log-server-system-variables/#slave_type_conversions

            People

              nirbhay_c Nirbhay Choubey (Inactive)
              tanj Guillaume Lefranc
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.