Affected Branch
trunk
Basic Diagnostics
Description
For endpoints in parsec, the option parsing for the following machines {agent, ticket machine, and shard} goes like this:
src/parsec/util.cpp, line 63
for(size_t i = 0; i < count; i++) {
auto ep_key = component_name + std::to_string(i) + "_endpoint";
}
-
Agents aren't replicated, so agent0_endpoint to agent{n-1}_endpoint works.
-
The ticket machine can be replicated but there is typically just one, so a single number works.
-
We can have many shards, and shard replicas; however, so the above code should be modified for double-digit compatibility.
In the trivial case (1 shard, 0 replicas) the representation shard00_endpoint is fair enough.
For many shards; however, we should use an underscore to separate the values like 2pc does.
|
shard0_0_endpoint="shard0:6666" |
For example, we can't tell which shard or replica shard111_endpoint refers to if we have 50 shards and 15x replication. The underscore fixes that: shard11_1_endpoint. Even if we don't plan on double-digit replication, the separation helps readability.
The potential for many shards can be seen at the bottom of the diagram.

Code of Conduct
Affected Branch
trunk
Basic Diagnostics
I've pulled the latest changes on the affected branch and the issue is still present.
The issue is reproducible in docker
Description
For endpoints in parsec, the option parsing for the following machines {agent, ticket machine, and shard} goes like this:
src/parsec/util.cpp, line 63Agents aren't replicated, so
agent0_endpointtoagent{n-1}_endpointworks.The ticket machine can be replicated but there is typically just one, so a single number works.
We can have many shards, and shard replicas; however, so the above code should be modified for double-digit compatibility.
In the trivial case (1 shard, 0 replicas) the representation
shard00_endpointis fair enough.For many shards; however, we should use an underscore to separate the values like 2pc does.
opencbdc-tx/2pc-compose.cfg
Line 18 in 96062b5
For example, we can't tell which shard or replica
shard111_endpointrefers to if we have 50 shards and 15x replication. The underscore fixes that:shard11_1_endpoint. Even if we don't plan on double-digit replication, the separation helps readability.The potential for many shards can be seen at the bottom of the diagram.

Code of Conduct