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

InnoDB crash while committing table-rebuilding ALTER TABLE

Details

    Description

      Currently, mysql_inplace_alter_table() in sql/sql_table.cc does the following:

        // Upgrade to EXCLUSIVE before commit.
        if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME))
          goto rollback;
      

      During this time, the ALTER TABLE thread is not doing anything useful. If this is a table-rebuilding ALTER TABLE operation (something that cannot be done as ALGORITHM=INSTANT (MDEV-13134) until parts of MDEV-11424 are finished, or if rebuild was requested by specifying the FORCE keyword), then it would make sense to let InnoDB invoke row_log_table_apply() after a request to upgrade the lock has been submitted.

      I would like to consider adding a variant of the ha_innobase::inplace_alter_table() call that would let InnoDB invoke the next batch of row_log_table_apply(). Once this call returns, the caller would check if the ALTER TABLE operation was killed or the MDL upgrade timed out, or the MDL was granted. As long as the lock wait should continue, the storage engine would be called again to do useful work during the wait.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            marko Marko Mäkelä made changes -
            Summary In ALTER TABLE…LOCK=NONE, keep applying log while waiting for MDL upgrade InnoDB crash while committing table-rebuilding ALTER TABLE
            marko Marko Mäkelä made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            marko Marko Mäkelä made changes -
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.0 [ 16000 ]
            Affects Version/s 10.1 [ 16100 ]
            marko Marko Mäkelä made changes -
            Labels online-ddl performance crash hang online-ddl performance
            marko Marko Mäkelä made changes -
            Labels crash hang online-ddl performance crash hang online-ddl performance upstream
            marko Marko Mäkelä made changes -
            Component/s Storage Engine - XtraDB [ 10135 ]
            marko Marko Mäkelä made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Eugene Kosov [ kevg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Eugene Kosov [ kevg ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Fix Version/s 10.2.26 [ 23409 ]
            Fix Version/s 10.3.17 [ 23411 ]
            Fix Version/s 10.4.7 [ 23720 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 86172 ] MariaDB v4 [ 154008 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 155388
            marko Marko Mäkelä made changes -

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              8 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.