Xiao-zhen-Liu commented on code in PR #4205:
URL: https://github.com/apache/texera/pull/4205#discussion_r2834804921


##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/controller/promisehandlers/QueryWorkerStatisticsHandler.scala:
##########
@@ -133,17 +171,17 @@ trait QueryWorkerStatisticsHandler {
           Future.collect(futures).flatMap(_ => processLayers(rest))
       }
 
-    // Start processing all layers and update the frontend after completion
+    // Start processing all layers and forward stats to the appropriate 
sink(s) on completion.
     processLayers(layers).map { _ =>
       collectedResults.foreach {
         case (wExec, resp, timestamp) =>
           wExec.update(timestamp, resp.metrics.workerState, 
resp.metrics.workerStatistics)
       }
-      sendToClient(
-        ExecutionStatsUpdate(cp.workflowExecution.getAllRegionExecutionsStats)
-      )
-      // Release the global query lock if it was set
+      forwardStats(msg.updateTarget)
+      // Record the completion timestamp before releasing the lock so that any 
timer
+      // firing in between sees a valid cache entry rather than triggering a 
redundant query.
       if (globalQueryStatsOngoing) {

Review Comment:
   Can the completion of filtered requests also trigger this lock-release?



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