Skip to content

Apply credentials and persistent names earlier, without waiting for schema.upgrade#10829

Merged
Totktonada merged 3 commits intotarantool:masterfrom
Serpentian:config-follow-ups-dll-before-upgrade
Nov 21, 2024
Merged

Apply credentials and persistent names earlier, without waiting for schema.upgrade#10829
Totktonada merged 3 commits intotarantool:masterfrom
Serpentian:config-follow-ups-dll-before-upgrade

Conversation

@Serpentian
Copy link
Copy Markdown
Contributor

@Serpentian Serpentian commented Nov 18, 2024

Closes #10541
Closes #10539

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 18, 2024

Coverage Status

coverage: 87.327% (-0.005%) from 87.332%
when pulling ddc0454 on Serpentian:config-follow-ups-dll-before-upgrade
into 5ae77cf
on tarantool:master
.

@Serpentian Serpentian marked this pull request as ready for review November 18, 2024 18:30
Copy link
Copy Markdown
Contributor

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes seems quite straightforward and I don't remember anything that would prevent it from working as expected. LGTM.

@Totktonada Totktonada assigned Serpentian and unassigned Totktonada Nov 18, 2024
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>
@Serpentian Serpentian force-pushed the config-follow-ups-dll-before-upgrade branch from cb9eb8e to ddc0454 Compare November 20, 2024 18:03
@Serpentian Serpentian assigned Totktonada and unassigned Serpentian Nov 20, 2024
@Totktonada Totktonada added the full-ci Enables all tests for a pull request label Nov 21, 2024
@Totktonada Totktonada removed their assignment Nov 21, 2024
@Totktonada
Copy link
Copy Markdown
Contributor

@Serpentian Thank you for the decent work!

@Totktonada Totktonada merged commit 7aa3e8c into tarantool:master Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

3 participants