Description
Related dev. issue(s): tarantool/vshard#430
Product: Tarantool/vshard
Since: 0.1.25 ?
Root document: https://www.tarantool.io/en/doc/latest/book/admin/vshard_admin/#configuration
SME: @ Gerold103
Details
Previously the config could include box options only on the root
level like so:
{
-- VShard options:
sharding = ...,
weights = ...,
bucket_count = ...,
...
-- Box options:
replication_timeout = ...,
memtx_use_mvcc_engine = ...,
net_msg_max = ...,
}
Those box-options are propagated to box.cfg{}
on each instance
using this config. But there was no way to pass different options
for difference instances via one config.
Now it is possible via their config sections in sharding
:
{
sharding = {
[replicaset_uuid] = {
replicas = {
[replica_uuid] = {
replication_timeout = ...,
net_msg_max = ...,
read_only = ...,
}
},
...
},
...
},
...
-- Box options:
replication_timeout = ...,
memtx_use_mvcc_engine = ...,
net_msg_max = ...,
}
For each instance its resulting box.cfg
is merged from the root
box options and from the instance's section in sharding
. If some
options are specified in both places, then the priority is for the
replica-local options.
For example:
{
sharding = {
[replicaset_uuid] = {
replicas = {
[replica_uuid] = {
replication_timeout = 100,
net_msg_max = 200,
}
},
},
},
replication_timeout = 50,
txn_timeout = 300,
}
The resulting box.cfg
config for the given replica will be:
{
replication_timeout = 100,
net_msg_max = 200,
txn_timeout = 300,
}
Requested by @ Gerold103 in tarantool/vshard@7466bee.