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

ALTER TABLE ... ADD INDEX... ALGORITHM=NOCOPY, LOCK=NONE locks parallel replication

    XMLWordPrintable

Details

    Description

      [Note that this issue is about lifting the restriction that parallel replication cannot automatically replicate DDL in parallel with other events.]

      Adding an index with ALTER TABLE ... , ALGORITHM=NOCOPY, LOCK=NONE locks parallel replication, please see below.

      table:

      CREATE TABLE `log` (
        `userid` int(10) unsigned NOT NULL,
        `entry` int(10) unsigned NOT NULL,
        `data` mediumblob NOT NULL,
        UNIQUE KEY `userid` (`userid`,`entry`),
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
      
      

      processlist:

      |    198 | system user          |                      | NULL            | Slave_IO     | 257566 | Waiting for master to send event                              | NULL                                                                                           |    0.000 |
      |    200 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    201 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    202 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    203 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    204 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    205 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    206 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    207 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    208 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    209 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    210 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    211 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    212 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    213 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    214 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    215 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    216 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    217 | system user          |                      | logging_db   | Slave_worker |   4415 | altering table                                                | alter table log ADD INDEX idx_entry (entry), algorithm=nocopy, lock=none                   |    0.000 |
      |    218 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    219 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    220 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    221 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    222 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    223 | system user          |                      | NULL            | Slave_worker |   4415 | Waiting for prior transaction to start commit                 | NULL                                                                                           |    0.000 |
      |    199 | system user          |                      | NULL            | Slave_SQL    |   4413 | Waiting for room in worker thread event queue                 | NULL                                                             
      

      gdb threads:

      PLEASE SEE ATTACHMENT

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pizzi Rick Pizzi
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.