You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2020/04/09 17:38:51 UTC

[incubator-pinot] branch master updated: Address extra comments in #5224 (#5230)

This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 535700b  Address extra comments in #5224 (#5230)
535700b is described below

commit 535700b62c08848d6fcc078ff93038b445f37428
Author: Xiaotian (Jackie) Jiang <17...@users.noreply.github.com>
AuthorDate: Thu Apr 9 10:38:40 2020 -0700

    Address extra comments in #5224 (#5230)
---
 .../helix/core/assignment/segment/OfflineSegmentAssignment.java     | 6 ++++--
 .../helix/core/assignment/segment/RealtimeSegmentAssignment.java    | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/OfflineSegmentAssignment.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/OfflineSegmentAssignment.java
index b11c893..4d01966 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/OfflineSegmentAssignment.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/OfflineSegmentAssignment.java
@@ -110,7 +110,9 @@ public class OfflineSegmentAssignment implements SegmentAssignment {
 
   /**
    * Helper method to check whether the number of replica-groups matches the table replication for replica-group based
-   * instance partitions. Log a warning if they do not match.
+   * instance partitions. Log a warning if they do not match and use the one inside the instance partitions. The
+   * mismatch can happen when table is not configured correctly (table replication and numReplicaGroups does not match
+   * or replication changed without reassigning instances).
    */
   private void checkReplication(InstancePartitions instancePartitions) {
     int numReplicaGroups = instancePartitions.getNumReplicaGroups();
@@ -171,7 +173,7 @@ public class OfflineSegmentAssignment implements SegmentAssignment {
 
     Map<String, Map<String, String>> newAssignment;
     if (bootstrap) {
-      LOGGER.info("Bootstrapping the table: {}", _offlineTableName);
+      LOGGER.info("Bootstrapping segment assignment for table: {}", _offlineTableName);
 
       // When bootstrap is enabled, start with an empty assignment and reassign all segments
       newAssignment = new TreeMap<>();
diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java
index 3679526..f7e99d2 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java
@@ -113,7 +113,9 @@ public class RealtimeSegmentAssignment implements SegmentAssignment {
 
   /**
    * Helper method to check whether the number of replica-groups matches the table replication for replica-group based
-   * instance partitions. Log a warning if they do not match.
+   * instance partitions. Log a warning if they do not match and use the one inside the instance partitions. The
+   * mismatch can happen when table is not configured correctly (table replication and numReplicaGroups does not match
+   * or replication changed without reassigning instances).
    */
   private void checkReplication(InstancePartitions instancePartitions) {
     int numReplicaGroups = instancePartitions.getNumReplicaGroups();
@@ -200,7 +202,7 @@ public class RealtimeSegmentAssignment implements SegmentAssignment {
           .info("Reassigning COMPLETED segments with COMPLETED instance partitions for table: {}", _realtimeTableName);
 
       if (bootstrap) {
-        LOGGER.info("Bootstrapping the COMPLETED segments for table: {}", _realtimeTableName);
+        LOGGER.info("Bootstrapping segment assignment for COMPLETED segments of table: {}", _realtimeTableName);
 
         // When bootstrap is enabled, start with an empty assignment and reassign all segments
         newAssignment = new TreeMap<>();


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