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/13 21:55:33 UTC

[GitHub] [pinot] snleee commented on a change in pull request #7761: Fix merge delay metric when there is empty bucket

snleee commented on a change in pull request #7761:
URL: https://github.com/apache/pinot/pull/7761#discussion_r748770287



##########
File path: pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java
##########
@@ -254,7 +254,11 @@ public String getTaskType() {
         // but the metrics are not available until the controller schedules a valid task
         long maxEndTimeMs = Long.MIN_VALUE;
         for (SegmentZKMetadata preSelectedSegment : preSelectedSegments) {
-          maxEndTimeMs = Math.max(maxEndTimeMs, preSelectedSegment.getEndTimeMs());
+          long currentEndTimeMs = preSelectedSegment.getEndTimeMs();
+          // Compute maxEndTimeMs among segments that are valid for merge (e.g. endTimeStamp < currentTime - bufferTime)
+          if (isValidBucketEndTime(currentEndTimeMs, bufferMs, lowerMergeLevel, mergeRollupTaskMetadata)) {
+            maxEndTimeMs = Math.max(maxEndTimeMs, preSelectedSegment.getEndTimeMs());

Review comment:
       good catch. fixed




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