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 2021/11/23 20:14:47 UTC

[GitHub] [pinot] xiangfu0 commented on a change in pull request #7817: Fix the broker routing when segment is deleted

xiangfu0 commented on a change in pull request #7817:
URL: https://github.com/apache/pinot/pull/7817#discussion_r754805996



##########
File path: pinot-broker/src/main/java/org/apache/pinot/broker/routing/RoutingManager.java
##########
@@ -110,94 +110,99 @@ public void init(HelixManager helixManager) {
   }
 
   @Override
-  public synchronized void processClusterChange(HelixConstants.ChangeType changeType) {
-    Preconditions.checkState(changeType == HelixConstants.ChangeType.EXTERNAL_VIEW
-        || changeType == HelixConstants.ChangeType.INSTANCE_CONFIG, "Illegal change type: %s", changeType);
-    if (changeType == HelixConstants.ChangeType.EXTERNAL_VIEW) {
-      processExternalViewChange();
-    } else {
+  public synchronized void processClusterChange(ChangeType changeType) {
+    if (changeType == ChangeType.IDEAL_STATE || changeType == ChangeType.EXTERNAL_VIEW) {
+      processSegmentAssignmentChange();
+    } else if (changeType == ChangeType.INSTANCE_CONFIG) {
       processInstanceConfigChange();
+    } else {
+      throw new IllegalArgumentException("Illegal change type: " + changeType);
     }
   }
 
-  private void processExternalViewChange() {
-    LOGGER.info("Processing external view change");
+  private void processSegmentAssignmentChange() {
+    LOGGER.info("Processing segment assignment change");

Review comment:
       just for the sake of debugability, shall we log which changeType event it it?




-- 
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