Use a number separator for parsec shard##_endpoint
to prevent double-digit confusion
#312
Open
3 tasks done
Labels
difficulty/01-good-first-issue
Very approachable for new contributors
enhancement/documentation
Improves documentation
status/in-progress
Has been assigned to a contributor and is under active development
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_endpoint
toagent{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.
opencbdc-tx/2pc-compose.cfg
Line 18 in 96062b5
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.
![parsec-diagram](https://private-user-images.githubusercontent.com/18053614/390180767-e56f873c-c242-4c7e-907c-d7eb8f19ef65.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTIwMDYsIm5iZiI6MTczOTAxMTcwNiwicGF0aCI6Ii8xODA1MzYxNC8zOTAxODA3NjctZTU2Zjg3M2MtYzI0Mi00YzdlLTkwN2MtZDdlYjhmMTllZjY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDEwNDgyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlMDk2YjEzYWU2MjAyYmVmNTg2YmYxMTk0OThlZmZmNzJhZTIxNzVlOTFhM2UzMzEzNjY4YjJiMTZiNGRhZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.okF9pbhaZmff99HKodlWgBK2wP6ygCW0d60jIwfD-eQ)
Code of Conduct
The text was updated successfully, but these errors were encountered: