You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/16 21:03:10 UTC

[GitHub] [pinot] navina commented on a diff in pull request #9816: Fix the replication in segment assignment strategy

navina commented on code in PR #9816:
URL: https://github.com/apache/pinot/pull/9816#discussion_r1024504515


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/strategy/BalancedNumSegmentAssignmentStrategy.java:
##########
@@ -51,6 +51,10 @@ public void init(HelixManager helixManager, TableConfig tableConfig) {
     SegmentsValidationAndRetentionConfig validationAndRetentionConfig = tableConfig.getValidationConfig();
     Preconditions.checkState(validationAndRetentionConfig != null, "Validation Config is null");
     _replication = validationAndRetentionConfig.getReplicationNumber();
+    // Number of replicas per partition of low-level consumers check is for the real time tables only
+    if (validationAndRetentionConfig.getReplicasPerPartition() != null) {

Review Comment:
   Is it possible to wrap all the logic for whether to use `replication` or `replicasPerPartition` within the TableConfig itself? That way, `tableConfig.getReplicationNumber` should just return the correct value depending on whether it is offline or realtime table. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org