Percona Server with XtraDB

innodb_expand_import holds data dictionary mutex while scanning .ibd file

Reported by Alexey Kopytov on 2011-12-08
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server
Undecided
Alexey Kopytov
5.1
Undecided
Alexey Kopytov
5.5
Undecided
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.

tags: added: cr i20106
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers