gengliangwang commented on code in PR #42244:
URL: https://github.com/apache/spark/pull/42244#discussion_r1280101256


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/ui/SparkConnectServerListener.scala:
##########
@@ -128,6 +126,43 @@ private[connect] class SparkConnectServerListener(
     }
   }
 
+  def onSQLExecutionStart(e: SparkListenerSQLExecutionStart): Unit = {
+    val executeJobTagOpt = e.jobTags.find {
+      case ExecuteJobTag(_) => true
+      case _ => false
+    }
+    if (executeJobTagOpt.isEmpty) {
+      return
+    }
+    val executeJobTag = executeJobTagOpt.get
+    val exec = executionList.get(executeJobTag)
+    if (exec.nonEmpty) {
+      exec.foreach { exec =>
+        exec.sqlExecId += e.executionId.toString
+        updateLiveStore(exec)
+      }
+    } else {
+      // This block guards against potential event re-ordering.

Review Comment:
   BTW, how often can the event reorder happen? It looks odd to update the data 
in KVStore.



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

Reply via email to