Skip to content
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

Support Tarantool 3.0 box.info changes #402

Closed
Gerold103 opened this issue Mar 7, 2023 · 0 comments
Closed

Support Tarantool 3.0 box.info changes #402

Gerold103 opened this issue Mar 7, 2023 · 0 comments
Assignees
Labels
feature A new functionality

Comments

@Gerold103
Copy link
Collaborator

In 3.0 the field box.info.cluster is renamed to box.info.replicaset. And there will be a new field box.info.cluster which will not have UUID and will have name field (for the whole cluster name, not for the single replicaset).

vshard.util should expose a function box_info_replicaset(info) which takes a box.info and returns replicaset. In < 3.0 it should return info.cluster. In >= 3.0 it should return info.replicaset. Usage example - uuid = util.box_info_replicaset(box.info).

I intentionally want to pass info as an argument. For cases when box.info is already done outside.

Also need to replace all the existing box.info.cluster usages with this new function.

@Gerold103 Gerold103 added the feature A new functionality label Mar 7, 2023
@Gerold103 Gerold103 self-assigned this Mar 28, 2023
Gerold103 added a commit that referenced this issue Mar 28, 2023
The newest Tarantool release will make several breaking changes.
The one concerning vshard - box.info.cluster changes its meaning.

This patch introduces a function for getting replicaset UUID not
depending on core Tarantool version.

Worth mentioning that Server:replicaset_uuid() workarounds this
issue on its own intentionally, without vshard.util. This is
because luatest shouldn't depend on vshard.

One test is still failing - upgrade.test.lua. It fails because
calls vshard.storage.cfg{} on 3.0 before upgrade. Non-first cfg
won't work on 3.0 because it uses box.info.cluster.uuid to check
if it matches UUID in the config. This can't be fixed as the old
code is already released years ago.

The test itself can be fixed, but it needs a commit to checkout to
upgrade from it. This commit is the first one supporting 3.0. It
means the test can only be fixed as a follow-up commit.

Another reload/upgrade test is reload_evolution/storage.test.lua.
It still works because doesn't try to call vshard.storage.cfg{}
until reload happens. Lets keep it while it is working fine.

Closes #402

NO_DOC=bugfix
Gerold103 added a commit that referenced this issue Mar 28, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Gerold103 added a commit that referenced this issue Mar 28, 2023
The newest Tarantool release will make several breaking changes.
The one concerning vshard - box.info.cluster changes its meaning.

This patch introduces a function for getting replicaset UUID not
depending on core Tarantool version.

Worth mentioning that Server:replicaset_uuid() workarounds this
issue on its own intentionally, without vshard.util. This is
because luatest shouldn't depend on vshard.

One test is still failing - upgrade.test.lua. It fails because
calls vshard.storage.cfg{} on 3.0 before upgrade. Non-first cfg
won't work on 3.0 because it uses box.info.cluster.uuid to check
if it matches UUID in the config. This can't be fixed as the old
code is already released years ago.

The test itself can be fixed, but it needs a commit to checkout to
upgrade from it. This commit is the first one supporting 3.0. It
means the test can only be fixed as a follow-up commit.

Another reload/upgrade test is reload_evolution/storage.test.lua.
It still works because doesn't try to call vshard.storage.cfg{}
until reload happens. Lets keep it while it is working fine.

Closes #402

NO_DOC=bugfix
Gerold103 added a commit that referenced this issue Mar 28, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Gerold103 added a commit that referenced this issue Mar 29, 2023
The newest Tarantool release will make several breaking changes.
The one concerning vshard - box.info.cluster changes its meaning.

This patch introduces a function for getting replicaset UUID not
depending on core Tarantool version.

Worth mentioning that Server:replicaset_uuid() workarounds this
issue on its own intentionally, without vshard.util. This is
because luatest shouldn't depend on vshard.

One test is still failing - upgrade.test.lua. It fails because
calls vshard.storage.cfg{} on 3.0 before upgrade. Non-first cfg
won't work on 3.0 because it uses box.info.cluster.uuid to check
if it matches UUID in the config. This can't be fixed as the old
code is already released years ago.

The test itself can be fixed, but it needs a commit to checkout to
upgrade from it. This commit is the first one supporting 3.0. It
means the test can only be fixed as a follow-up commit.

Another reload/upgrade test is reload_evolution/storage.test.lua.
It still works because doesn't try to call vshard.storage.cfg{}
until reload happens. Lets keep it while it is working fine.

Closes #402

NO_DOC=bugfix
Gerold103 added a commit that referenced this issue Mar 29, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Gerold103 added a commit that referenced this issue Mar 29, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Gerold103 added a commit that referenced this issue May 18, 2023
The newest Tarantool release will make several breaking changes.
The one concerning vshard - box.info.cluster changes its meaning.

This patch introduces a function for getting replicaset UUID not
depending on core Tarantool version.

Worth mentioning that Server:replicaset_uuid() workarounds this
issue on its own intentionally, without vshard.util. This is
because luatest shouldn't depend on vshard.

One test is still failing - upgrade.test.lua. It fails because
calls vshard.storage.cfg{} on 3.0 before upgrade. Non-first cfg
won't work on 3.0 because it uses box.info.cluster.uuid to check
if it matches UUID in the config. This can't be fixed as the old
code is already released years ago.

The test itself can be fixed, but it needs a commit to checkout to
upgrade from it. This commit is the first one supporting 3.0. It
means the test can only be fixed as a follow-up commit.

Another reload/upgrade test is reload_evolution/storage.test.lua.
It still works because doesn't try to call vshard.storage.cfg{}
until reload happens. Lets keep it while it is working fine.

Closes #402

NO_DOC=bugfix
Gerold103 added a commit that referenced this issue May 18, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Gerold103 added a commit that referenced this issue May 18, 2023
The test tried to call vshard.storage.cfg{} second time on 3.0
using an old vshard version. It won't work because the old
non-first cfg tried to compare box.info.cluster.uuid with the
replicaset UUID in the config. But box.info.cluster.uuid is nil in
3.0. It was moved to box.info.replicaset.uuid.

The patch makes the upgrade test use the first commit compatible
with 3.0 as the basic version, if the Tarantool executable is 3.0.

Note that on versions < 3.0 the vshard upgrade still works fine,
hence on old executables the basic version is kept as is.

Follow up #402

NO_DOC=test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

No branches or pull requests

1 participant