Contrib Fake PR : Bug#116716 - Allow Setting Nb Thread for Tablespace Duplicate Check (startup). #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows setting the number of threads for InnoDB Tablespace Duplicate Check, implementing the feature request Bug #116716 : Allow Setting Nb Thread for Tablespace Duplicate Check (startup).
This is a "Contrib Fake PR". It is there so people can comment on this work in case it needs adjustments. This has been contributed on 2024-12-03 as a patch file in Bug #116716. More about Fake PR in the RFC blog post, section Fake PRs and my Way of Working on MySQL Contributions.
This PR merges on 9.1.0, and the patch file also applies on 8.4.3 and 8.0.40.
For allowing setting the number of threads for InnoDB Tablespace Duplicate Check, this PR introduces a new global variable : innodb_tablespace_duplicate_check_threads. The default value is -1, which means the already implemented heuristic is used for setting the number of threads. A value of 0 to MAX VAL overrides the number of threads of the heuristic.
Ideally, in addition to being included in a next Innovation Release, this would be back ported in 8.4 and 8.0. The default value of the global variable introduced by this change is backward compatible with 8.4 and 8.0, so I think this change does not introduce any compatibility problems. And as this change introduces a potential performance improvement making startup faster, I think there is value in back-porting it.
Examples on how this PR is useful was added in Bug #116716.
I also blogged about this: InnoDB Tablespace Duplicate Check Threads.