vshard: per-instance box options in the config
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/vshard/issues/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 https://github.com/tarantool/vshard/commit/7466bee5a06bc869b14a7f3ffac2ee334353867a.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the vshard administration configuration section linked as the root document. Document that replica-local box options can be placed in each instance's sharding section, how they merge with root options, and that local values take precedence. Include the Lua examples from the issue and ensure the resulting box.cfg behavior is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100