snleee commented on a change in pull request #7368:
URL: https://github.com/apache/pinot/pull/7368#discussion_r719684328
##########
File path:
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java
##########
@@ -463,4 +490,71 @@ private long getWatermarkMs(long minStartTimeMs, long
bucketMs, String mergeLeve
return pinotTaskConfigs;
}
+
+ private long getMergeRollupTaskDelayInNumTimeBuckets(long watermarkMs, long
bufferTimeMs, long bucketTimeMs) {
+ if (bufferTimeMs == 0 || watermarkMs == -1) {
+ return 0;
+ }
+ return (long) Math.floor((System.currentTimeMillis() - watermarkMs -
bufferTimeMs) / (double) bucketTimeMs);
Review comment:
I went over the current algorithm and we correctly report the delay
until we reach the last window. The last window's watermark will be bumped up
with the delay because we bump up in the next round. So, the delay will be >=
1; however, I think that this is fine to keep it this way. The delay is at
least aligned with the watermark value.
Also, we will put the alerts on larger number (e.g. 7 buckets), so I don't
see the major issue here.
--
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]