<div dir="ltr"><div>Hi, Vlad.</div><div><br></div><div>I've run my cartridge upgrade tests on your branch (6e50e26c), and it's ok on tarantool 2.2, but fails for 1.10:</div><div>```</div><div><code class="gmail-job-log gmail-d-block"><div class="gmail-js-line gmail-log-line"><span class="gmail-ws-pre-wrap gmail-term-fg-cyan">replica | </span><span class="gmail-ws-pre-wrap gmail-term-fg-red">ApplyConfigError: Space _schema does not support multi-statement transactions</span></div></code><code class="gmail-job-log gmail-d-block"><div class="gmail-js-line gmail-log-line"> <span class="gmail-ws-pre-wrap gmail-term-fg-cyan">replica | </span><span class="gmail-ws-pre-wrap gmail-term-fg-red">stack traceback:</span></div></code><code class="gmail-job-log gmail-d-block"><div class="gmail-js-line gmail-log-line"> <span class="gmail-ws-pre-wrap gmail-term-fg-cyan">replica | </span><span class="gmail-ws-pre-wrap gmail-term-fg-red"> ...cartridge/.rocks/share/tarantool/vshard/storage/init.lua:419: in function 'schema_upgrade'</span></div></code><code class="gmail-job-log gmail-d-block"> <span class="gmail-ws-pre-wrap gmail-term-fg-cyan">replica | </span><span class="gmail-ws-pre-wrap gmail-term-fg-red"> ...cartridge/.rocks/share/tarantool/vshard/storage/init.lua:2336: in function 'cfg'</span></code></div><div><code class="gmail-job-log gmail-d-block"><span class="gmail-ws-pre-wrap gmail-term-fg-red">```</span></code></div><div><code class="gmail-job-log gmail-d-block"><span class="gmail-ws-pre-wrap gmail-term-fg-red"><br></span></code></div><div>Here are results from Gitlab CI: <a href="https://gitlab.com/tarantool/cartridge/pipelines/129256300">https://gitlab.com/tarantool/cartridge/pipelines/129256300</a></div><div><br></div><div>And here is one more remark about the patch itself.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 21 Mar 2020 at 21:59, Vladislav Shpilevoy <<a href="mailto:v.shpilevoy@tarantool.org">v.shpilevoy@tarantool.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
local function this_is_master()<br>
@@ -2169,8 +2276,12 @@ local function storage_cfg(cfg, this_replica_uuid, is_reload)<br>
error(err)<br>
end<br>
<a href="http://log.info" rel="noreferrer" target="_blank">log.info</a>("Box has been configured")<br>
- local uri = luri.parse(this_replica.uri)<br>
- box.once("vshard:storage:1", storage_schema_v1, uri.login, uri.password)<br>
+ end<br>
+<br>
+ local uri = luri.parse(this_replica.uri)<br>
+ schema_upgrade(is_master, uri.login, uri.password)<br>
+<br>
+ if not is_reload then<br></blockquote><div><br></div><div>It seems like this `if/else` statement isn't necessary. The `else` branch is enough for both cases.</div><div>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<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
box.space._bucket:on_replace(bucket_generation_increment)<br>
else<br>
local old = box.space._bucket:on_replace()[1]<br>
@@ -2469,6 +2580,8 @@ M.rlist = {<br>
add_tail = rlist_add_tail,<br>
remove = rlist_remove,<br>
}<br>
+M.schema_latest_version = schema_latest_version<br>
+M.schema_current_version = schema_current_version<br>
<br>
return {<br>
sync = sync,<br>
-- <br>
2.21.1 (Apple Git-122.3)<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span><div><div dir="ltr">С уважением. <br>Дынников Ярослав.<br></div></div></span></div></div></div>