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

Unable to connect with net.box to 2.2 if box.schema.upgrade() has not been called. #4691

Closed
Kasen opened this issue Dec 18, 2019 · 2 comments
Assignees
Labels
bug Something isn't working upgrade
Milestone

Comments

@Kasen
Copy link

Kasen commented Dec 18, 2019

Tarantool version:
2.2.1-137

OS version:
CentOS Linux release 7.6.1810
Bug description:
If I start 2.2 as a read-only replica of 1.10, then I can't connect to this node with error:

error: Space '277' does not exist

Steps to reproduce:

  1. Start tarantool 1.10
  2. Start the second instance of 1.10
  3. Configure replication between these instances. The second instance must be read-only.
  4. Restart the second instance with tarantool 2.2
  5. Try to connect to the second instance with net.box
@rosik
Copy link
Contributor

rosik commented Jan 10, 2020

@kyukhin could you please set a milestone and help with fixing that.

@Totktonada
Copy link
Member

Totktonada commented Jan 10, 2020

It is the next incarnation of #4307. We missed the case when a remote instance is run on a new tarantool version, but don't upgraded yet and so lack of _vcollation view.

A trivial fix is possible: we can just ignore an error of fetching _vcollation. We may try to strength this way with some kind of verification whether the error is transient or not. I'm not sure that this way is right, but I don't see any other one for now.

@kyukhin kyukhin added the bug Something isn't working label Jan 14, 2020
@kyukhin kyukhin added this to the 2.2.3 milestone Jan 14, 2020
@Totktonada Totktonada self-assigned this Jan 23, 2020
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 20, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users becouse a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 20, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users becouse a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 20, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users because a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 20, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users because a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 20, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users because a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 22, 2020
This patch introduces automatic schema upgrade. The main idea to
apply box.schema.upgrade on the leader instance.

We can't do it on each instance - it lead to replication
conflicts. We can't delegate it to users because a bug: "Space 277
doesn't exist" (tarantool/tarantool#4691)
still is not resolved.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 23, 2020
This patch introduces an option - `upgrade_schema` to perform
an upgrade procedure if we want to upgrade tarantool version.
The main idea to apply box.schema.upgrade on the leader instance.
We can't do it on each instance - it lead to replication
conflicts if we have 2 or more writable instances.

We don't do it automatically to give an ability for user to check
that instances works fine with new tarantool version but old
schema. This thesis is not relevant just now because of
"Space 277 doesn't exist" (tarantool/tarantool#4691).
But I hope it will be solved soon.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 23, 2020
This patch introduces an option - `upgrade_schema` to perform
an upgrade procedure if we want to upgrade tarantool version.
The main idea to apply box.schema.upgrade on the leader instance.
We can't do it on each instance - it lead to replication
conflicts if we have 2 or more writable instances.

We don't do it automatically to give an ability for user to check
that instances works fine with new tarantool version but old
schema. This thesis is not relevant just now because of
"Space 277 doesn't exist" (tarantool/tarantool#4691).
But I hope it will be solved soon.

Closes #640
olegrok added a commit to tarantool/cartridge that referenced this issue Mar 24, 2020
This patch introduces an option - `upgrade_schema` to perform
an upgrade procedure if we want to upgrade tarantool version.
The main idea to apply box.schema.upgrade on the leader instance.
We can't do it on each instance - it lead to replication
conflicts if we have 2 or more writable instances.

We don't do it automatically to give an ability for user to check
that instances works fine with new tarantool version but old
schema. This thesis is not relevant just now because of
"Space 277 doesn't exist" (tarantool/tarantool#4691).
But I hope it will be solved soon.

Closes #640
rosik pushed a commit to tarantool/cartridge that referenced this issue Mar 26, 2020
This patch introduces an option - `upgrade_schema` to perform
an upgrade procedure if we want to upgrade tarantool version.
The main idea to apply box.schema.upgrade on the leader instance.
We can't do it on each instance - it lead to replication
conflicts if we have 2 or more writable instances.

We don't do it automatically to give an ability for user to check
that instances works fine with new tarantool version but old
schema. This thesis is not relevant just now because of
"Space 277 doesn't exist" (tarantool/tarantool#4691).
But I hope it will be solved soon.

Closes #640
rosik added a commit to tarantool/cartridge that referenced this issue Mar 27, 2020
This patch introduces an option - `upgrade_schema` to perform an upgrade
procedure if we want to upgrade tarantool version. The main idea to
apply `box.schema.upgrade` on the leader (according to failover priority
in topology confgig). We can't do it on each instance - it lead to
replication conflicts if we have 2 or more writable instances.

We don't do it automatically to give an ability for user to check that
instances works fine with new tarantool version but old schema. This
thesis is not relevant just now because of "Space 277 doesn't exist"
error (tarantool/tarantool#4691). But I hope it will be solved soon.

Also introduce new type of tests - "upgrade". The main idea it to try to
bootstrap server from existing snapshots with older schema version.

See also #587 

Co-authored-by: Yaroslav Dynnikov <yaroslav.dynnikov@gmail.com>
Totktonada added a commit that referenced this issue Apr 1, 2020
After 2.2.0-633-gaa0964ae1 ('net.box: fix schema fetching from 1.10/2.1
servers') net.box expects that _vcollation system view exists on a
tarantool server of 2.2.1+ version. This is however not always so: a
server may be run on a new version of tarantool, but work on a schema of
an old version.

The situation with non last schema is usual for replication cluster in
process of upgrading: all instances run on the new version of tarantool
first (no auto-upgrade is performed by tarantools in a cluster). Then
box.schema.upgrade() should be called, but the instances should be
operable even before the call.

Before the commit net.box was unable to connect a server if it is run on
a schema without _vcollation system view (say, 2.1.3), but the server
executable is of 2.2.1 version or newer.

Follows up #4307
Fixes #4691
Totktonada added a commit that referenced this issue Apr 20, 2020
After 2.2.0-633-gaa0964ae1 ('net.box: fix schema fetching from 1.10/2.1
servers') net.box expects that _vcollation system view exists on a
tarantool server of 2.2.1+ version. This is however not always so: a
server may be run on a new version of tarantool, but work on a schema of
an old version.

The situation with non last schema is usual for replication cluster in
process of upgrading: all instances run on the new version of tarantool
first (no auto-upgrade is performed by tarantools in a cluster). Then
box.schema.upgrade() should be called, but the instances should be
operable even before the call.

Before the commit net.box was unable to connect a server if it is run on
a schema without _vcollation system view (say, 2.1.3), but the server
executable is of 2.2.1 version or newer.

Note: I trim tests from the commit to polish them a bit more, but
include the fix itself to 2.4.1 release.

Follows up #4307
Fixes #4691
kyukhin pushed a commit that referenced this issue Apr 20, 2020
After 2.2.0-633-gaa0964ae1 ('net.box: fix schema fetching from 1.10/2.1
servers') net.box expects that _vcollation system view exists on a
tarantool server of 2.2.1+ version. This is however not always so: a
server may be run on a new version of tarantool, but work on a schema of
an old version.

The situation with non last schema is usual for replication cluster in
process of upgrading: all instances run on the new version of tarantool
first (no auto-upgrade is performed by tarantools in a cluster). Then
box.schema.upgrade() should be called, but the instances should be
operable even before the call.

Before the commit net.box was unable to connect a server if it is run on
a schema without _vcollation system view (say, 2.1.3), but the server
executable is of 2.2.1 version or newer.

Note: I trim tests from the commit to polish them a bit more, but
include the fix itself to 2.4.1 release.

Follows up #4307
Fixes #4691

(cherry picked from commit 06edcbe)
kyukhin pushed a commit that referenced this issue Apr 20, 2020
After 2.2.0-633-gaa0964ae1 ('net.box: fix schema fetching from 1.10/2.1
servers') net.box expects that _vcollation system view exists on a
tarantool server of 2.2.1+ version. This is however not always so: a
server may be run on a new version of tarantool, but work on a schema of
an old version.

The situation with non last schema is usual for replication cluster in
process of upgrading: all instances run on the new version of tarantool
first (no auto-upgrade is performed by tarantools in a cluster). Then
box.schema.upgrade() should be called, but the instances should be
operable even before the call.

Before the commit net.box was unable to connect a server if it is run on
a schema without _vcollation system view (say, 2.1.3), but the server
executable is of 2.2.1 version or newer.

Note: I trim tests from the commit to polish them a bit more, but
include the fix itself to 2.4.1 release.

Follows up #4307
Fixes #4691

(cherry picked from commit 06edcbe)
Totktonada added a commit to Totktonada/tarantool that referenced this issue Jan 9, 2023
See tarantool#4691 for the problem description. In brief: before the fix net.box
expected _vcollation presence if tarantool's runtime on the server is
new enough disregarding a server's schema version. The old schema
version has no this view, so net.box was unable to connect. After tarantool#4691
net.box tolerates lack of the view.

The fix was pushed without a test (see [1]) and now I want to pay this
debt.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016207.html

Follows up tarantool#4307
Follows up tarantool#4691
Fixes tarantool#5482

NO_DOC=just a new test
NO_CHANGELOG=see NO_DOC
Totktonada added a commit to Totktonada/tarantool that referenced this issue Jan 9, 2023
See tarantool#4691 for the problem description. In brief: before the fix net.box
expected _vcollation presence if tarantool's runtime on the server is
new enough disregarding a server's schema version. The old schema
version has no this view, so net.box was unable to connect. After tarantool#4691
net.box tolerates lack of the view.

The fix was pushed without a test (see [1]) and now I want to pay this
debt.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016207.html

Follows up tarantool#4307
Follows up tarantool#4691
Fixes tarantool#5482

NO_DOC=just a new test
NO_CHANGELOG=see NO_DOC
Totktonada added a commit to Totktonada/tarantool that referenced this issue Jan 13, 2023
See tarantool#4691 for the problem description. In brief: before the fix net.box
expected _vcollation presence if tarantool's runtime on the server is
new enough disregarding a server's schema version. The old schema
version has no this view, so net.box was unable to connect. After tarantool#4691
net.box tolerates lack of the view.

The fix was pushed without a test (see [1]) and now I want to pay this
debt.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016207.html

Follows up tarantool#4307
Follows up tarantool#4691
Fixes tarantool#5482

NO_DOC=just a new test
NO_CHANGELOG=see NO_DOC
Totktonada added a commit to Totktonada/tarantool that referenced this issue Jan 25, 2023
See tarantool#4691 for the problem description. In brief: before the fix net.box
expected _vcollation presence if tarantool's runtime on the server is
new enough disregarding a server's schema version. The old schema
version has no this view, so net.box was unable to connect. After tarantool#4691
net.box tolerates lack of the view.

The fix was pushed without a test (see [1]) and now I want to pay this
debt.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016207.html

Follows up tarantool#4307
Follows up tarantool#4691
Fixes tarantool#5482

NO_DOC=just a new test
NO_CHANGELOG=see NO_DOC
Totktonada added a commit that referenced this issue Jan 25, 2023
See #4691 for the problem description. In brief: before the fix net.box
expected _vcollation presence if tarantool's runtime on the server is
new enough disregarding a server's schema version. The old schema
version has no this view, so net.box was unable to connect. After #4691
net.box tolerates lack of the view.

The fix was pushed without a test (see [1]) and now I want to pay this
debt.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016207.html

Follows up #4307
Follows up #4691
Fixes #5482

NO_DOC=just a new test
NO_CHANGELOG=see NO_DOC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upgrade
Projects
None yet
Development

No branches or pull requests

4 participants