HeartSaVioR commented on code in PR #44165: URL: https://github.com/apache/spark/pull/44165#discussion_r1414783355
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala: ########## @@ -137,6 +137,10 @@ class RocksDB( @volatile private var numKeysOnWritingVersion = 0L @volatile private var fileManagerMetrics = RocksDBFileManagerMetrics.EMPTY_METRICS + // SPARK-46249 - Keep track of recorded metrics per version which can be used for querying later + // Updates and access to recordedMetrics are protected by the DB instance lock + @volatile private var recordedMetrics: Option[RocksDBMetrics] = None Review Comment: Let's explicitly add annotation for which lock the field depends on, like below field. `@GuardedBy("acquireLock")` -- 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