[MDEV-21832] FORCE all partition to rebuild if any one of the partition does rebuild Created: 2020-02-27 Updated: 2020-05-05 Resolved: 2020-03-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Storage Engine - InnoDB |
| Affects Version/s: | 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.3.23, 10.4.13, 10.5.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thirunarayanan Balathandayuthapani | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
During DDL, if one partition requires table rebuild and other partition doesn't need rebuild then all partition should be forced to rebuild. In ha_innobase::commit_inplace_alter_table() assumes that all partition does same operation
|
| Comments |
| Comment by Thirunarayanan Balathandayuthapani [ 2020-02-28 ] | ||||||||||||||||||||||||||||||||||
|
Patch is in bb-10.4- | ||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2020-03-02 ] | ||||||||||||||||||||||||||||||||||
|
Why would ha_partition need to rebuild all partitions? | ||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-03-02 ] | ||||||||||||||||||||||||||||||||||
|
serg, since MySQL 5.6.10 (the first GA version), ha_innobase::commit_inplace_alter_table() does the internal commit for all partitions, so that the ALTER TABLE operation is atomic. That code is assuming that all partitions are handled in the same way (rebuild or not). It might be possible, but much trickier, to allow a subset of the partitions to be rebuilt. | ||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2020-03-02 ] | ||||||||||||||||||||||||||||||||||
|
Yes, but ha_partition is an upper-layer storage engine. It should not be tweaked to whatever limitations individual engines might have. If InnoDB wants all partitions to be rebuilt, it should try to handle this case internally, if possible. Without contaminating ha_partition with InnoDB-specific changes. | ||||||||||||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2020-03-10 ] | ||||||||||||||||||||||||||||||||||
|
Just adding the workaround patch for future reference workaround_MDEV-21832.patch | ||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2020-03-26 ] | ||||||||||||||||||||||||||||||||||
|
here's fix I suggest
this is the partitioning part. The logic here — if ha_alter_info->handler_flags changes, we need to ask all partitions again, as it's basically a different ALTER TABLE now. And InnoDB, inside ha_innobase::check_if_supported_inplace_alter can set ALTER_RECREATE when needed. | ||||||||||||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2020-03-27 ] | ||||||||||||||||||||||||||||||||||
|
Patch is in bb-10.3- | ||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-03-30 ] | ||||||||||||||||||||||||||||||||||
|
OK to push to 10.3. |