luoyuqinlaura commented on code in PR #59964:
URL: https://github.com/apache/spark/pull/59964#discussion_r4647477678


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala:
##########
@@ -981,6 +981,33 @@ abstract class SQLAppStatusListenerSuite extends 
SharedSparkSession with JsonTes
 
     assertJobs(statusStore.execution(executionId), running = Seq(0))
   }
+
+  test("SPARK-60756: onJobStart should not force a kvstore write during 
history replay") {
+    val store = new ElementTrackingStore(new InMemoryStore, sparkContext.conf)
+    val replayListener = new SQLAppStatusListener(sparkContext.conf, store, 
live = false)
+    val executionId = 1L
+    val df = createTestDataFrame
+    replayListener.onOtherEvent(SparkListenerSQLExecutionStart(
+      executionId,
+      Some(executionId),
+      "test",
+      "test",
+      df.queryExecution.toString,
+      SparkPlanInfo.fromSparkPlan(df.queryExecution.executedPlan),
+      System.currentTimeMillis(),
+      Map.empty))
+
+    replayListener.onJobStart(SparkListenerJobStart(
+      jobId = 0,
+      time = System.currentTimeMillis(),
+      stageInfos = Nil,
+      createProperties(executionId)))
+
+    intercept[NoSuchElementException] {

Review Comment:
    I'll leave the test as is to keep this PR small, since the flush behavior 
is unchanged by this PR



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