jack-moseley commented on a change in pull request #3358:
URL: https://github.com/apache/gobblin/pull/3358#discussion_r685607375



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskStateCollectorService.java
##########
@@ -281,7 +280,8 @@ private void reportJobProgress(TaskState taskState) {
     this.bytesCopiedSoFar += taskByteSize;
     Double newPercentageCopied = this.bytesCopiedSoFar / this.totalSizeToCopy;
 
-    if (newPercentageCopied - this.lastPercentageReported > 
ConfigurationKeys.DEFAULT_PROGRESS_REPORTING_THRESHOLD) {
+    if (newPercentageCopied - this.lastPercentageReported >= 
ConfigurationKeys.DEFAULT_PROGRESS_REPORTING_THRESHOLD ||
+        (newPercentageCopied > 1 - 
ConfigurationKeys.DEFAULT_PROGRESS_REPORTING_THRESHOLD && 
Math.abs(newPercentageCopied - this.lastPercentageReported) > 0.001)) {

Review comment:
       Since we have a config for progress reporting threshold set to 5%, I 
think it makes the most sense if that still applies even in the last interval 
instead of suddenly sending more events at the end of the job (other than the 
fix of always sending the final 100% completion event).




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


Reply via email to