[MDEV-5158] ALTER TABLE ... ENGINE=INNODB in one database blocks ALTER TABLE in other databases Created: 2013-10-19 Updated: 2019-12-14 Resolved: 2019-12-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | wsrep |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Minor |
| Reporter: | Jeff Armstrong | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Won't Fix | Votes: | 1 |
| Labels: | galera | ||
| Description |
|
I have 400 databases on my server. If I issue an ALTER TABLE ... ENGINE=INNODB on different tables in different databases at the same time, the updates are serialised - i.e only one ALTER TABLE is executed on the server at a time. All other ALTER TABLE on unrelated tables in unrelated databases block with a status of "checking permissions". I have about 28,000 tables / 400 databases / 250G of MyISAM. This serialisation means that it takes 6 hours to perform a MyISAM to INNODB upgrade. The server load and iostats indicate that the server is almost idle this entire time. |
| Comments |
| Comment by Elena Stepanova [ 2013-10-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Jeff, Could you please provide the cnf file and structures (and the number of rows) for two tables which get serialized this way? I don't observe it on a primitive example, so it must be something specific either for the tables or for configuration.
(it's just a small fraction of the output, i was able to alter the table dozens of times, and every time it happened within a second or so. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-10-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry I didn't notice earlier that you were using MariaDB Galera, it might be important. So, does it happen when the server is running in standalone mode, or do you have an actual cluster? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jeff Armstrong [ 2013-10-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have a two node cluster configured, but only one node is actually up for the ALTER TABLE session. Node2 was closed down cleanly. Once the ALTER TABLE has completed, I zap the galera state on node2 and it comes up after SST. I could try wsrep_on = OFF if you think that might be a valid test case? As this is a server setting, I would have to do this on the weekend as the cluster is active and used throughout the day. I will create a test based on your SQL and let you know how I get on in the next two days. Regards | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jeff Armstrong [ 2013-10-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Configuration: In order from three files: binlog_cache_size = 1G query_cache_type = 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-10-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It seems to be indeed related to wsrep. As soon as I enabled wsrep_provider / wsrep_cluster_address on a single-node setup, I got exactly the same blocking as described, even with the primitive two-table test. Assigning to Seppo to confirm and say whether it's intentional. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nirbhay Choubey (Inactive) [ 2013-12-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksey Sanin (Inactive) [ 2013-12-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2013-12-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Removing target because this is current limitation. |