jingz-db commented on code in PR #47528: URL: https://github.com/apache/spark/pull/47528#discussion_r1699101433
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/OperatorStateMetadata.scala: ########## @@ -166,18 +169,28 @@ object OperatorStateMetadataUtils extends Logging { s"version=${operatorStateMetadata.version}") } } + + def getLastOffsetBatch(session: SparkSession, checkpointLocation: String): Long = { Review Comment: Just thinking out loud here, so we are reading metadata from latest batch in the offsetlog. Suppose a query failed before committing the batch and write nothing to the metadata path, and then we start a metadata reader from it: could there be situation where a batchId exists in offsetLog but there is actually no metadata written at this batchId? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org