-
Notifications
You must be signed in to change notification settings - Fork 377
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 upgrade schema in Tarantool 3 after bootstrapping from 2.11 #9989
Comments
Even simpler repro:
Then
|
I cannot reproduce it without cartridge. |
Something is wrong with your snapshot. Here I built Tarantool from tarantool> box.space._vfunc:format()
---
- [{'name': 'id', 'type': 'unsigned'}, {'name': 'owner', 'type': 'unsigned'}, {'name': 'name',
'type': 'string'}, {'name': 'setuid', 'type': 'unsigned'}, {'name': 'language',
'type': 'string'}, {'name': 'body', 'type': 'string'}, {'name': 'routine_type',
'type': 'string'}, {'name': 'param_list', 'type': 'array'}, {'name': 'returns',
'type': 'string'}, {'name': 'aggregate', 'type': 'string'}, {'name': 'sql_data_access',
'type': 'string'}, {'name': 'is_deterministic', 'type': 'boolean'}, {'name': 'is_sandboxed',
'type': 'boolean'}, {'name': 'is_null_call', 'type': 'boolean'}, {'name': 'exports',
'type': 'array'}, {'name': 'opts', 'type': 'map'}, {'name': 'comment', 'type': 'string'},
{'name': 'created', 'type': 'string'}, {'name': 'last_altered', 'type': 'string'}]
... Here is tarantool> box.space._vfunc:format()
---
- [{'name': 'id', 'type': 'unsigned'}, {'name': 'owner', 'type': 'unsigned'}, {'name': 'name',
'type': 'string'}, {'name': 'setuid', 'type': 'unsigned'}]
... In your smaller repro I see line What's about broken upgrade, I see that format of |
The problem is broken schema in snapshot, upgrade from real Tarantool 2.11 work fine. |
Bug description
I tried to bootstrap 3.1 replica from 2.11 cluster (Cartridge-based) and got error
Field ''[7][20]'' was not found in the tuple
while trying to callbox.schema.upgrade()
Tarantool 3.1.0-0-g96f6d88
Steps to reproduce
Setup replicaset on 2.11 (I used Cartridge)
Run tarantool 3.1 in interactive mode:
tarantool -i
Connect tarantool 3.1 to 2.11 replicaset:
box.cfg{replication = {'admin@localhost:3302', 'admin@localhost:3303'}}
In logs:
Your schema version is 2.11.0 while Tarantool 3.1.0-0-g96f6d88 requires a more recent schema version. Please, consider using box.schema.upgrade().
Everything is OK, replica is bootstrapped and replication is alright.
Current schema:
box.space._schema:select({})
Call upgrade:
box.schema.upgrade()
In logs:
2024-05-02 16:44:56.945 [64285] main/104/interactive/box.upgrade I> drop field max_id in space _schema
2024-05-02 16:44:56.946 [64285] main/104/interactive/box.upgrade I> set schema version to 2.11.1
2024-05-02 16:44:56.946 [64285] main/104/interactive/box.upgrade I> update replicaset uuid key
2024-05-02 16:44:56.946 [64285] main/104/interactive/box.upgrade I> add instance names to _cluster
2024-05-02 16:44:56.946 [64285] main/104/interactive/box.upgrade I> set schema version to 3.0.0
2024-05-02 16:44:56.946 [64285] main/104/interactive/box.upgrade I> add trigger to _func
Error received:
Current schema:
box.space._schema:select({})
Actual behavior
Error received, any following calls of schema.upgrade return the same error.
Expected behavior
Schema should be updated. The other way, user should receive a clearer error message with details how to fix upgrade manually.
The text was updated successfully, but these errors were encountered: