jackjlli commented on a change in pull request #8323:
URL: https://github.com/apache/pinot/pull/8323#discussion_r822216824
##########
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:
It'd be good to add some description here for better understanding of
the intention of the test you added.
##########
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:
Add the comment back here saying the push is not yet finished, since any
cases reaching this line must be qualified for that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]