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

Inconsistency in Galera caused by ALTER being aborted before entering TOI mode

    XMLWordPrintable

Details

    Description

      There's a chance that ALTER may get BF-aborted by another running TOI operation before entering TOI mode because of MDL conflict:

      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict·
      schema:  test
      request: (19    seqno 1627  wsrep (toi, exec, aborted) cmd 3 3  ALTER TABLE tt_1_fk ADD COLUMN mtN93 MEDIUMTEXT AFTER ipkey, LOCK=EXCLUSIVE, ALGORITHM=DEFAULT)
      granted: (17    seqno -1    wsrep (local, exec, aborted) cmd 3 7    DELETE FROM tt_1 WHERE ipkey >= 13863 AND ipkey <= 77403)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL ticket: type: MDL_SHARED_READ space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict-> BF abort
      schema:  test
      request: (19    seqno 1627  wsrep (toi, exec, aborted) cmd 3 3  ALTER TABLE tt_1_fk ADD COLUMN mtN93 MEDIUMTEXT AFTER ipkey, LOCK=EXCLUSIVE, ALGORITHM=DEFAULT)
      granted: (17    seqno -1    wsrep (local, exec, aborted) cmd 3 7    DELETE FROM tt_1 WHERE ipkey >= 13863 AND ipkey <= 77403)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL ticket: type: MDL_SHARED_READ space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-04 16:11:31 23 [Note] WSREP: wsrep_abort_thd not effective: bf 139693854844672 victim 139693855459072 wsrep 1 wsrep_on 1 RSU 0 TOI 1 aborting 1
      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict db=test table=tt_1_fk ticket=3 solved by abort
      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict·
      schema:  test
      request: (19    seqno 1627  wsrep (toi, exec, aborted) cmd 3 3  ALTER TABLE tt_1_fk ADD COLUMN mtN93 MEDIUMTEXT AFTER ipkey, LOCK=EXCLUSIVE, ALGORITHM=DEFAULT)
      granted: (16    seqno -1    wsrep (local, exec, aborted) cmd 3 3    ALTER TABLE tt_1_fk DROP COLUMN cN102, LOCK=SHARED, ALGORITHM=DEFAULT)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL ticket: type: MDL_SHARED_HIGH_PRIO space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict-> BF abort
      schema:  test
      request: (19    seqno 1627  wsrep (toi, exec, aborted) cmd 3 3  ALTER TABLE tt_1_fk ADD COLUMN mtN93 MEDIUMTEXT AFTER ipkey, LOCK=EXCLUSIVE, ALGORITHM=DEFAULT)
      granted: (16    seqno -1    wsrep (local, exec, aborted) cmd 3 3    ALTER TABLE tt_1_fk DROP COLUMN cN102, LOCK=SHARED, ALGORITHM=DEFAULT)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL ticket: type: MDL_SHARED_HIGH_PRIO space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-04 16:11:31 23 [Note] WSREP: MDL conflict db=test table=tt_1_fk ticket=2 solved by abort
      

      Attachments

        Activity

          People

            sysprg Julius Goryavsky
            denis.protivensky Denis Protivensky
            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.