Skip to content
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

Explicitly specify ordered replication list for vshard storage #1950

Closed
R-omk opened this issue Oct 13, 2022 · 0 comments · Fixed by #1952
Closed

Explicitly specify ordered replication list for vshard storage #1950

R-omk opened this issue Oct 13, 2022 · 0 comments · Fixed by #1952
Assignees

Comments

@R-omk
Copy link
Contributor

R-omk commented Oct 13, 2022

Since the vsahrd storage call box.cfg and pass replication option, it can happen that the replication list is specified in a different order rather then if it do cartridge itself.

All this leads to that problem. tarantool/tarantool#7805

The place where we should explicitly pass the replication list:

local function apply_config(conf, _)
checks('table', {is_master = 'boolean'})
local my_replicaset = conf.topology.replicasets[vars.replicaset_uuid]
local group_name = my_replicaset.vshard_group or 'default'
local vshard_cfg = vshard_utils.get_vshard_config(group_name, conf)
vshard_cfg.weights = nil
vshard_cfg.zone = nil
vshard_cfg.collect_lua_garbage = nil
vshard_cfg.listen = box.cfg.listen

This way it can prevent the list from being populated randomly.
https://github.com/tarantool/vshard/blob/bcf87e270033ac516cfff1d703c2020a3ee6ba81/vshard/storage/init.lua#L3100-L3104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants