WweiL commented on code in PR #48355:
URL: https://github.com/apache/spark/pull/48355#discussion_r1869959754


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala:
##########
@@ -965,7 +966,8 @@ class MicroBatchExecution(
       updateStateStoreCkptId(execCtx, latestExecPlan)
     }
     execCtx.reportTimeTaken("commitOffsets") {
-      if (!commitLog.add(execCtx.batchId, 
CommitMetadata(watermarkTracker.currentWatermark))) {
+      if (!commitLog.add(execCtx.batchId,
+        CommitMetadata(watermarkTracker.currentWatermark, 
currentStateStoreCkptId.toMap))) {

Review Comment:
   Verified here in this PR: https://github.com/apache/spark/pull/49063
   
   The conclusion is a earlier version of Spark can read a commit log V1 
generated with the change.
   
   May I know what is the reason of insisting a `None` here? In 
`streamingQueryProgress` we also save empty maps instead of `None` 
   
https://github.com/apache/spark/blob/b0c5642f696e413d71106ad53c35381bdeba47b9/sql/api/src/main/scala/org/apache/spark/sql/streaming/progress.scala#L57
 



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