PrachiKhobragade commented on code in PR #10387:
URL: https://github.com/apache/pinot/pull/10387#discussion_r1128447623
##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java:
##########
@@ -211,6 +217,10 @@ public List<PinotTaskConfig>
generateTasks(List<TableConfig> tableConfigs) {
}
}
+ // Get scheduling mode which is "one-off" by default. If "lookBack" mode
is enabled, there will be no
+ // watermark, and each round we pick the buckets in chronological order
which have unmerged segments.
+ boolean isLookBack =
"lookBack".equalsIgnoreCase(taskConfigs.get(MergeTask.MODE));
Review Comment:
Make lookBack a constant
##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java:
##########
@@ -260,9 +270,13 @@ public List<PinotTaskConfig>
generateTasks(List<TableConfig> tableConfigs) {
// Get watermark from MergeRollupTaskMetadata ZNode
// bucketStartMs = watermarkMs
// bucketEndMs = bucketStartMs + bucketMs
- long watermarkMs =
- getWatermarkMs(preSelectedSegments.get(0).getStartTimeMs(),
bucketMs, mergeLevel, mergeRollupTaskMetadata);
- long bucketStartMs = watermarkMs;
+ long bucketStartMs = preSelectedSegments.get(0).getStartTimeMs() /
bucketMs * bucketMs;
+ long watermarkMs = 0;
+ if (!isLookBack) {
+ watermarkMs =
getWatermarkMs(preSelectedSegments.get(0).getStartTimeMs(), bucketMs,
mergeLevel,
Review Comment:
Add a variable preSelectedSegStarttimeMs? can be replaced here and L273
--
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]