jugomezv commented on code in PR #10387: URL: https://github.com/apache/pinot/pull/10387#discussion_r1128451865
########## pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java: ########## @@ -792,9 +960,20 @@ private void cleanUpDelayMetrics(List<TableConfig> tableConfigs) { Map<String, String> taskConfigs = currentTableConfig.getTaskConfig().getConfigsForTaskType(getTaskType()); Map<String, Map<String, String>> mergeLevelToConfigs = MergeRollupTaskUtils.getLevelToConfigMap(taskConfigs); Map<String, Long> tableToWatermark = _mergeRollupWatermarks.get(tableNameWithType); - for (String mergeLevel : tableToWatermark.keySet()) { - if (!mergeLevelToConfigs.containsKey(mergeLevel)) { - resetDelayMetrics(tableNameWithType, mergeLevel); + if (tableToWatermark != null) { Review Comment: why can this be null now and not before? ########## pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java: ########## @@ -330,14 +354,18 @@ public List<PinotTaskConfig> generateTasks(List<TableConfig> tableConfigs) { // TODO: If there are many small merged segments, we should merge them again selectedSegmentsForBucket = new ArrayList<>(); hasUnmergedSegments = false; + isAllSegmentsReadyToMerge = true; bucketStartMs = (startTimeMs / bucketMs) * bucketMs; bucketEndMs = bucketStartMs + bucketMs; - if (!isValidBucketEndTime(bucketEndMs, bufferMs, lowerMergeLevel, mergeRollupTaskMetadata)) { + if (!isValidBucketEndTime(bucketEndMs, bufferMs, lowerMergeLevel, mergeRollupTaskMetadata, isLookBack)) { break; } - if (!isMergedSegment(preSelectedSegment, mergeLevel)) { + if (!isMergedSegment(preSelectedSegment, mergeLevel, sortedMergeLevels)) { Review Comment: More specifically: line 322 seems to have exact same code as here with same action: `if (!isMergedSegment(preSelectedSegment, mergeLevel, sortedMergeLevels)) { hasUnmergedSegments = true; }` Can we factor that at start of if that is in line 330: `if (endTimeMs >= bucketStartMs) {` -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org