Cleanup ReplicationEngine:createThreadPool to avoid hardcoding Vcr
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 298
- Avg merge
- 21h 43m
- Merged PRs (30d)
- 9
Description
The method that creates replication threads hardcodes the prefix "Vcr" in the thread name when the startThread argument has value of true. While it currently happens to be the case that the parameter is only set for Vcr, it is dangerous to make that assumption and makes the code non-intuitive to read.
```
private List createThreadPool(String datacenter, int numberOfThreads, boolean startThread) {
String threadIdentity =
(startThread ? "Vcr" : "") + "ReplicaThread-" + (dataNodeId.getDatacenterName().equals(datacenter) ? "Intra-"
: "Inter-") + i + "-" + datacenter;
```
Contributor guide
No contributing guide indexed for this repository
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 at ReplicationEngine#createThreadPool and inspect its callers to understand how thread identities are used for different replication modes. Remove the method's assumption that a started thread must use the Vcr prefix while preserving the existing identity format; verify the replication-related tests or checks available in the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100