Hi, Vlad.
I've run my cartridge upgrade tests on your branch (6e50e26c), and it's ok on tarantool 2.2, but fails for 1.10:
```
replica | ApplyConfigError: Space _schema does not support multi-statement transactions
replica | stack traceback:
replica | ...cartridge/.rocks/share/tarantool/vshard/storage/init.lua:419: in function 'schema_upgrade'
replica | ...cartridge/.rocks/share/tarantool/vshard/storage/init.lua:2336: in function 'cfg'
```
And here is one more remark about the patch itself.
local function this_is_master()
@@ -2169,8 +2276,12 @@ local function storage_cfg(cfg, this_replica_uuid, is_reload)
error(err)
end
log.info("Box has been configured")
- local uri = luri.parse(this_replica.uri)
- box.once("vshard:storage:1", storage_schema_v1, uri.login, uri.password)
+ end
+
+ local uri = luri.parse(this_replica.uri)
+ schema_upgrade(is_master, uri.login, uri.password)
+
+ if not is_reload then
It seems like this `if/else` statement isn't necessary. The `else` branch is enough for both cases.
Even it's not hot reload it would result in `local old = nil; box.space._bucket:on_replace(new_trigger, nil)` which is essentially the same
box.space._bucket:on_replace(bucket_generation_increment)
else
local old = box.space._bucket:on_replace()[1]
@@ -2469,6 +2580,8 @@ M.rlist = {
add_tail = rlist_add_tail,
remove = rlist_remove,
}
+M.schema_latest_version = schema_latest_version
+M.schema_current_version = schema_current_version
return {
sync = sync,
--
2.21.1 (Apple Git-122.3)
--
С уважением.
Дынников Ярослав.