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

galera node crash after create table x, create table y(foreign key references x)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.1.40
    • N/A
    • Galera

    Description

      We have topology like this:
      server1 (master-slave replication) => server2 (galera) <=> server3 and server4

      When following sql is executed on server1, nodes server3 and server4 kills itself because of "Node consistency compromized".

      DROP TABLE IF EXISTS `a`;
      /*!40101 SET @saved_cs_client = @@character_set_client */;
      /*!40101 SET character_set_client = utf8 */;
      CREATE TABLE `a` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `ct` mediumint(8) unsigned NOT NULL,
      `dt` tinyint(4) NOT NULL DEFAULT '0',
      `et` datetime NOT NULL,
      `ft` datetime DEFAULT NULL,
      `gt` varchar(255) COLLATE utf8_czech_ci NOT NULL,
      `ht` varchar(255) COLLATE utf8_czech_ci NOT NULL,
      `it` varchar(255) COLLATE utf8_czech_ci NOT NULL,
      `jt` mediumtext COLLATE utf8_czech_ci NOT NULL,
      `tt` text COLLATE utf8_czech_ci NOT NULL,
      `xt` text COLLATE utf8_czech_ci NOT NULL,
      PRIMARY KEY (`id`),
      KEY `FK_a_projects` (`ct`),
      KEY `dt` (`dt`),
      CONSTRAINT `FK_a_projects` FOREIGN KEY (`ct`) REFERENCES `projects` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB AUTO_INCREMENT=53577 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;
       
      DROP TABLE IF EXISTS `a_bts`;
      /*!40101 SET @saved_cs_client = @@character_set_client */;
      /*!40101 SET character_set_client = utf8 */;
      CREATE TABLE `a_bts` (
      `at` bigint(20) unsigned NOT NULL,
      `bt` varchar(255) COLLATE utf8_czech_ci NOT NULL,
      PRIMARY KEY (`at`,`bt`),
      CONSTRAINT `FK_a_bts_a` FOREIGN KEY (`at`) REFERENCES `a` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
      

      Jun  3 09:07:12 +-lab-dbsb2 mysqld: 2019-06-03  9:07:12 140065444357888 [Note] WSREP: REPL Protocols: 7 (3, 2)
      Jun  3 09:07:12 +-lab-dbsb2 mysqld: 2019-06-03  9:07:12 140065444357888 [Note] WSREP: Assign initial position for certification: 1843806, protocol version: 3
      Jun  3 09:07:12 +-lab-dbsb2 mysqld: 2019-06-03  9:07:12 140063115572992 [Note] WSREP: Service thread queue flushed.
      Jun  3 09:07:15 +-lab-dbsb2 mysqld: 2019-06-03  9:07:15 140063065241344 [Note] WSREP: (eaf937c8, 'tcp://0.0.0.0:4567') turning message relay requesting off
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 1845039)
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] Slave SQL: Error executing row event: 'Table 'st_cms.a' doesn't exist', Internal MariaDB error code: 1146
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: RBR event 14 Update_rows_v1 apply warning: 1146, 1845039
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: Failed to apply app buffer: seqno: 1845039, status: 1
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: #011 at galera/src/trx_handle.cpp:apply():351
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: Retrying 2th time
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 1845039)
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] Slave SQL: Error executing row event: 'Table 'st_cms.a' doesn't exist', Internal MariaDB error code: 1146
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: RBR event 14 Update_rows_v1 apply warning: 1146, 1845039
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: Failed to apply app buffer: seqno: 1845039, status: 1
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: #011 at galera/src/trx_handle.cpp:apply():351
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: Retrying 3th time
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 1845039)
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] Slave SQL: Error executing row event: 'Table 'st_cms.a' doesn't exist', Internal MariaDB error code: 1146
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: RBR event 14 Update_rows_v1 apply warning: 1146, 1845039
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: Failed to apply app buffer: seqno: 1845039, status: 1
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: #011 at galera/src/trx_handle.cpp:apply():351
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: Retrying 4th time
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1146, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 0 seqno: 1845039)
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] Slave SQL: Error executing row event: 'Table 'st_cms.a' doesn't exist', Internal MariaDB error code: 1146
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [Warning] WSREP: RBR event 14 Update_rows_v1 apply warning: 1146, 1845039
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] WSREP: Failed to apply trx: source: d21e550c-85cd-11e9-bcb1-3f613e076d5d version: 3 local: 0 state: APPLYING flags: 1 conn_id: 25 trx_id: 166358317 seqnos (l: 1558, g: 1845039, s: 1845038, d: 1845012, ts: 1533043168716954)
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] WSREP: Failed to apply trx 1845039 4 times
      Jun  3 09:13:18 +-lab-dbsb2 mysqld: 2019-06-03  9:13:18 140065428539136 [ERROR] WSREP: Node consistency compromized, aborting...
      

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            bambuch Adam Bambuch
            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.