vldpyatkov commented on code in PR #6059:
URL: https://github.com/apache/ignite-3/pull/6059#discussion_r2156779231


##########
modules/compute/src/main/java/org/apache/ignite/internal/compute/executor/ComputeExecutorImpl.java:
##########
@@ -123,6 +131,27 @@ public JobExecutionInternal<ComputeJobDataHolder> 
executeJob(
         return new JobExecutionInternal<>(execution, isInterrupted, null, 
false, topologyService.localMember());
     }
 
+    private static Callable<CompletableFuture<ComputeJobDataHolder>> 
addObservableTimestamp(
+            Callable<CompletableFuture<ComputeJobDataHolder>> jobCallable,
+            ClockService clockService) {
+        return () -> {
+            CompletableFuture<ComputeJobDataHolder> jobFut = 
jobCallable.call();
+
+            if (jobFut == null) {
+                return CompletableFuture.completedFuture(
+                        new ComputeJobDataHolder(ComputeJobDataType.NATIVE, 
null, clockService.nowLong()));
+            }
+
+            return jobFut.thenApply(holder -> {
+                if (holder == null) {
+                    return new ComputeJobDataHolder(ComputeJobDataType.NATIVE, 
null, clockService.nowLong());
+                }
+
+                return new ComputeJobDataHolder(holder.type(), holder.data(), 
clockService.nowLong());

Review Comment:
   Why is nowLong() used here (and twice above) instead of currentLong()?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to