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/03/09 02:11:16 UTC

[GitHub] [pinot] jtao15 commented on a change in pull request #8323: Fix segment status checker to skip push in-progress segments

jtao15 commented on a change in pull request #8323:
URL: https://github.com/apache/pinot/pull/8323#discussion_r822229684



##########
File path: pinot-controller/src/test/java/org/apache/pinot/controller/helix/SegmentStatusCheckerTest.java
##########
@@ -340,12 +340,15 @@ public void missingEVPartitionPushTest() {
     idealState.setPartitionState("myTable_0", "pinot1", "ONLINE");
     idealState.setPartitionState("myTable_1", "pinot1", "ONLINE");
     idealState.setPartitionState("myTable_1", "pinot2", "ONLINE");
+    idealState.setPartitionState("myTable_2", "pinot1", "ONLINE");
+    idealState.setPartitionState("myTable_2", "pinot2", "ONLINE");
     idealState.setReplicas("2");
     idealState.setRebalanceMode(IdealState.RebalanceMode.CUSTOMIZED);
 
     ExternalView externalView = new ExternalView(offlineTableName);
     externalView.setState("myTable_1", "pinot1", "ONLINE");
     externalView.setState("myTable_1", "pinot2", "ONLINE");
+    externalView.setState("myTable_2", "pinot1", "ONLINE");

Review comment:
       Updated

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java
##########
@@ -178,21 +178,17 @@ private void updateSegmentMetrics(String tableNameWithType, Context context) {
         // No online segments in ideal state
         continue;
       }
+      // Skip push in-progress segments
+      SegmentZKMetadata segmentZKMetadata =
+          _pinotHelixResourceManager.getSegmentZKMetadata(tableNameWithType, partitionName);
+      if (segmentZKMetadata != null
+          && segmentZKMetadata.getPushTime() > System.currentTimeMillis() - _waitForPushTimeSeconds * 1000) {
+        continue;

Review comment:
       Added the comment




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