-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make writable partition selection account for partitions with more than 3 replicas #1349
Make writable partition selection account for partitions with more than 3 replicas #1349
Conversation
…e than 3 replicas Currently, selecting writable partiton for PUT operation only picks partitions with highest local replica count. This will become a problem when "move replica" is rolled out. In the intermediate state of "move replica", particular partion may have 6 replicas and if we stick with current logic. All the write traffic will be routed to this particular partition. Hence, this PR we make changes to allow partition selection to pick partitons with replicas count >= min replica count(specified in ClusterMapConfig). In most cases, min replica count = 3.
Codecov Report
@@ Coverage Diff @@
## master #1349 +/- ##
=========================================
Coverage ? 71.97%
Complexity ? 6673
=========================================
Files ? 485
Lines ? 38031
Branches ? 4820
=========================================
Hits ? 27373
Misses ? 9357
Partials ? 1301
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please reformat files before we merge.
@@ -261,5 +269,6 @@ public ClusterMapConfig(VerifiableProperties verifiableProperties) { | |||
verifiableProperties.getLongInRange("clustermap.replica.catchup.acceptable.lag.bytes", 0L, 0L, Long.MAX_VALUE); | |||
clustermapReplicaCatchupTarget = | |||
verifiableProperties.getIntInRange("clustermap.replica.catchup.target", 0, 0, Integer.MAX_VALUE); | |||
clustermapWritablePartitionMinReplicaCount = verifiableProperties.getIntInRange("clustermap.writable.partition.min.replica.count", 3, 0, Integer.MAX_VALUE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: might need formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I am on it
Currently, selecting writable partition for PUT operation only picks partitions with highest local replica count. This will become a problem when "move replica" is rolled out. In the intermediate state of "move replica", particular partition may have 6 replicas and if we stick with current logic. All the write traffic will be routed to this particular partition. Hence, this PR we make changes to allow partition selection to pick partitions with replicas count >= min replica count(specified in
ClusterMapConfig). In most cases, min replica count = 3.