You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I call admin_bootstrap_vshard(). cold group is bootstrapped successfully, but there are two problems:
admin_bootstrap_vshard returns error
unix/:./tmp/run/myapp.router.control> cartridge.admin_bootstrap_vshard()
---
- null
- line: 131
class_name: Bootstrapping vshard failed
err: Sharding config is empty
file: '....rocks/share/tarantool/cartridge/roles/vshard-router.lua'
stack: "stack traceback:\n\t....rocks/share/tarantool/cartridge/roles/vshard-router.lua:131:
in function 'bootstrap_group'\n\t....rocks/share/tarantool/cartridge/roles/vshard-router.lua:169:
in function <....rocks/share/tarantool/cartridge/roles/vshard-router.lua:147>\n\t[C]:
in function 'xpcall'\n\t...se/cartridge-cli/myapp/.rocks/share/tarantool/errors.lua:145:
in function <...se/cartridge-cli/myapp/.rocks/share/tarantool/errors.lua:139>\n\t[C]:
in function 'pcall'\n\tbuiltin/box/console.lua:412: in function 'eval'\n\tbuiltin/box/console.lua:718:
in function 'repl'\n\tbuiltin/box/console.lua:852: in function <builtin/box/console.lua:838>\n\t[C]:
in function 'pcall'\n\tbuiltin/socket.lua:1078: in function <builtin/socket.lua:1076>"
str: 'Bootstrapping vshard failed: Sharding config is empty'
...
After bootstrapping all groups, vshard-router. bootstrap checks if there was some errors, and returns the last error.
As a result, two-phase commit is skipped in this case, and vshard groups config isn't updated (bootstrapped: true should be set after successful bootstrapping).
The possible solution
I sure that we have to update vshard groups config anyway if some groups were successfully bootstrapped.
Moreover, I think that my case is valid, I don't have to create replicasets of ALL groups mentioned in config.
And maybe can_bootstrap_vshard should return true only if there are some replicasets with non-bootstrapped groups.
(Now it checks that all groups mentioned in config are bootstratpped).
The text was updated successfully, but these errors were encountered:
I also think I shouldn't be forced to create replicasets for all sharding groups mentioned in the config. E.g. during development I may want to fill in the group names before I actually create storage roles for all of them. So, an empty sharding group shouldn't result in an error. A warning is quite enough.
Cartridge version:
cartridge == 2.3.0-1
The problem
My application has
hot
andcold
vshard groups configured.I create one storage replicaset with
cold
group.cartridge.admin_get_replicasets()
Then, I call
admin_bootstrap_vshard()
.cold
group is bootstrapped successfully, but there are two problems:admin_bootstrap_vshard
returns error<group>.bootstrapped
isfalse
:The possible reason
After bootstrapping all groups,
vshard-router. bootstrap
checks if there was some errors, and returns the last error.As a result, two-phase commit is skipped in this case, and vshard groups config isn't updated (
bootstrapped: true
should be set after successful bootstrapping).The possible solution
I sure that we have to update vshard groups config anyway if some groups were successfully bootstrapped.
Moreover, I think that my case is valid, I don't have to create replicasets of ALL groups mentioned in config.
And maybe
can_bootstrap_vshard
should returntrue
only if there are some replicasets with non-bootstrapped groups.(Now it checks that all groups mentioned in config are bootstratpped).
The text was updated successfully, but these errors were encountered: