Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
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
- relates to
-
MDEV-16329 Engine-independent online ALTER TABLE
-
- Closed
-
-
MDEV-11424 Instant ALTER TABLE of failure-free record format changes
-
- Closed
-
-
MDEV-13134 Introduce ALTER TABLE attributes ALGORITHM=NOCOPY and ALGORITHM=INSTANT
-
- Closed
-
-
MDEV-34988 InnoDB locks dict_sys.latch for a long time during ALTER TABLE
-
- Open
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Link |
This issue relates to |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Summary | In ALTER TABLE…LOCK=NONE, keep applying log while waiting for MDL upgrade | InnoDB crash while committing table-rebuilding ALTER TABLE |
Issue Type | Task [ 3 ] | Bug [ 1 ] |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] |
Labels | online-ddl performance | crash hang online-ddl performance |
Labels | crash hang online-ddl performance | crash hang online-ddl performance upstream |
Component/s | Storage Engine - XtraDB [ 10135 ] |
Link |
This issue relates to |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Eugene Kosov [ kevg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Eugene Kosov [ kevg ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
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 ] |
Link | This issue relates to MDEV-21783 [ MDEV-21783 ] |
Workflow | MariaDB v3 [ 86172 ] | MariaDB v4 [ 154008 ] |
Zendesk Related Tickets | 155388 |
Link | This issue relates to MDEV-34988 [ MDEV-34988 ] |