[MDEV-19229] Allow innodb_undo_tablespaces to be changed after database creation Created: 2019-04-10 Updated: 2023-12-09 Resolved: 2022-10-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.11.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Thirunarayanan Balathandayuthapani | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
| Comments |
| Comment by Thirunarayanan Balathandayuthapani [ 2019-04-10 ] | ||
|
I don't see the reason for innodb_rollback_segments variable value have lesser value than 128. Hopefully, we can remove it in the future. | ||
| Comment by Matthias Leich [ 2022-09-01 ] | ||
|
origin/bb-10.6- | ||
| Comment by Marko Mäkelä [ 2022-09-05 ] | ||
|
thiru, please update the Description to say what will happen when the requirements are not met, and to document each failure scenario. To my understanding, it was always possible to start InnoDB with a smaller number of innodb_undo_tablespaces so that some of the previously created undo tablespaces would be left unused. The main change here is that we allow new undo tablespaces to be created if the specified innodb_undo_tablespaces exceeds the number of undo tablespace files. | ||
| Comment by Marko Mäkelä [ 2022-09-05 ] | ||
|
If it is possible to implement the following, I would suggest that we do it like this:
This would imply a notable change of existing behaviour: If innodb_undo_tablespaces is specified to be smaller than the number of undo tablespace files, InnoDB could refuse to start up (instead of just ignoring the ‘extra’ files). | ||
| Comment by Marko Mäkelä [ 2022-09-26 ] | ||
|
Thank you. This looks feature-complete, including testing that incremental backup will be refused if the undo tablespaces have been reinitialized. I posted some review comments. | ||
| Comment by Marko Mäkelä [ 2022-10-04 ] | ||
|
I posted some more review comments, mostly minor, mainly about the fault injection. | ||
| Comment by Marko Mäkelä [ 2022-10-10 ] | ||
|
Before this change, in trx_assign_rseg_low() there was some code that would avoid using anything else than the first rollback segment in the system tablespace when the server is started with innodb_undo_tablespaces=0. With this change, we should rebuild the undo tablespaces whenever the detected number of undo tablespace files disagrees with the specified number. That is, the special handling in trx_assign_rseg_low() can be simplified. | ||
| Comment by Matthias Leich [ 2022-10-19 ] | ||
|
| ||
| Comment by Marko Mäkelä [ 2022-10-20 ] | ||
|
To reduce the risk of potentially breaking anything in stable releases, a decision was made to only fix this in the 10.11 series for now. Technically, the same change should work in any version starting with 10.6 where it was developed and tested. | ||
| Comment by Marko Mäkelä [ 2022-10-20 ] | ||
| Comment by Marko Mäkelä [ 2022-10-21 ] | ||
|
The revised patch for 10.11 is OK to push, as soon as it has passed the stress tests. |