-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session: fix upgrade process for bootstrap v90 #34862
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/5eb00b6641827521ddd4983160f5500453c33704 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1835,6 +1835,15 @@ func upgradeToVer89(s Session, ver int64) { | |||
// to the error log. The message is important since the behavior is weird | |||
// (changes to the config file will no longer take effect past this point). | |||
func importConfigOption(s Session, configName, svName, valStr string) { | |||
if valStr == "" || valStr == "0" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be a little chance that '0' is explicitly specified in the configuration file, but IMHO it's fine to skip it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. It will need to be fixed if we import a possible 0-value config item in future.
i.e. For most cache-settings we usually have a flag for enabled, and another flag for capacity. But it's common (outside of tidb) that you just have one flag for capacity, and 0 means not enabled. If this case existed it might not be handled correctly.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 422d086
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.1 in PR #34870 |
TiDB MergeCI notify
|
What problem does this PR solve?
Issue Number: close #34847
Problem Summary:
The bootstrap upgrade process did not work when there was no config file present. It has been fixed to handle this case correctly.
What is changed and how it works?
Check List
Tests
My upgrade script:
Previous output (trimmed for readability):
New output:
Confirming that it still works when a config file is present:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.