WweiL commented on code in PR #48355: URL: https://github.com/apache/spark/pull/48355#discussion_r1871393003
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala: ########## @@ -278,77 +280,186 @@ class RocksDB( // We send snapshots that needs to be uploaded by the maintenance thread to this queue private val snapshotsToUploadQueue = new ConcurrentLinkedQueue[RocksDBSnapshot]() + /** + * Based on the ground truth lineage loaded from changelog file (lineage) and + * the latest snapshot (version, uniqueId) pair from file listing, this function finds + * the ground truth latest snapshot (version, uniqueId) the db instance needs to load. + * + * @param lineage the ground truth lineage loaded from changelog file Review Comment: Lineage is updated when: 1. in commit, `lineageManager.appendLineageItem(LineageItem(newVersion, sessionStateStoreCkptId.get))`, where newVersion is loadedVersion + 1 2. in load, append current (version, id) to the lineage loaded from the changelog. So logically it is sorted, but I could add a sort per your request -- 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]
