[Tarantool-patches] [PATCH vshard 1/2] storage: introduce upgrade strategy

Yaroslav Dynnikov yaroslav.dynnikov at tarantool.org
Tue Mar 24 18:21:32 MSK 2020


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'
```

Here are results from Gitlab CI:
https://gitlab.com/tarantool/cartridge/pipelines/129256300

And here is one more remark about the patch itself.

On Sat, 21 Mar 2020 at 21:59, Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
wrote:

>
>  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)
>
>

-- 
С уважением.
Дынников Ярослав.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200324/f57f8c67/attachment.html>


More information about the Tarantool-patches mailing list