Apply credentials and persistent names earlier, without waiting for schema.upgrade#10829
Merged
Totktonada merged 3 commits intotarantool:masterfrom Nov 21, 2024
Merged
Conversation
Totktonada
reviewed
Nov 18, 2024
Totktonada
reviewed
Nov 18, 2024
Totktonada
reviewed
Nov 18, 2024
Totktonada
approved these changes
Nov 18, 2024
Contributor
Totktonada
left a comment
There was a problem hiding this comment.
The changes seems quite straightforward and I don't remember anything that would prevent it from working as expected. LGTM.
Commit aeb53ca ("upgrade: allow DDL before box.schema.upgrade is called") allowed setting names on 2.11.5 schema. Now config doesn't have to wait for the latest schema to apply persistent names. Let's set replicaset and instance names on 2.11.5 schema. This commit also majorly changes names_upgrade_test in order to cover two cases: upgrade from the 2.11.0 and from the 2.11.5. Closes tarantool#10541 Follow-up tarantool#10520 NO_DOC=internal NO_CHANGELOG=<described in the scope of tarantool#10520 changelog>
Config module sets on_replace trigger on `_schema` in order to know, when it's time to apply credentials. However, this on_replace trigger doesn't check, that exactly version in _schema is updated and not e.g. `replicaset_name`. In the following commit credentials will be applied on 2.11.1 schema version and not on the latest one. Since version objects will be compared, it's unacceptable, that `mkversion` module returns nil. Moreover soon `internal.mkversion` will be removed. Public `version` module will be used instead. However, `version` module strictly verifies types of the arguments. Without checking for the name of field in on_replace trigger we may try to create new version object from `replicaset_name`, which will cause error. Let's check the name of updated field in config's on_replace trigger. Needed for tarantool#10521 Needed for tarantool#10539 NO_DOC=bugfix NO_CHANGELOG=<users're not affected> NO_TEST=<already covered>
Since commit aeb53ca ("upgrade: allow DDL before box.schema.upgrade is called") allowed DDL starting from 2.11.1 schema version, config can apply credentials earlier, without waiting for full schema upgrade. Closes tarantool#10539 Follow-up tarantool#10520 NO_DOC=internal NO_CHANGELOG=<described in the scope of tarantool#10520 changelog>
cb9eb8e to
ddc0454
Compare
Totktonada
reviewed
Nov 21, 2024
Totktonada
approved these changes
Nov 21, 2024
Contributor
|
@Serpentian Thank you for the decent work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #10541
Closes #10539