innodb_expand_import holds data dictionary mutex while scanning .ibd file

Bug #901775 reported by Alexey Kopytov
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to
Fix Released
Alexey Kopytov
Fix Released
Alexey Kopytov
Fix Released
Alexey Kopytov

Bug Description

ALTER TABLE ... IMPORT TABLESPACE is holding the data dictionary mutex during the entire import operation.

This becomes a problem for innodb_expand_import, because that code scans the tablespace being imported, blocking all queries accessing any InnoDB tables during the scan. It does need to protect some data dictionary operations, but it is possible to release the mutex during the most expensive operation, i.e. the .ibd file scan.

The only problem with temporarily releasing the mutex is that changing the table's metadata while it's being imported may lead to data dictionary corruption. But in 5.1 any query trying to open that table will fail with an error, because InnoDB sets the ibd_file_missing flag for the in-memory table object until import is complete. In 5.5 queries will block on the metadata lock set by ALTER TABLE. So the table's metadata is protected even without holding the data dictionary mutex.

Related branches

tags: added: cr i20106
description: updated
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers