dongjoon-hyun commented on code in PR #52018:
URL: https://github.com/apache/spark/pull/52018#discussion_r2277084277
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreProvider.scala:
##########
@@ -767,7 +767,9 @@ private[sql] class RocksDBStateStoreProvider
}
override def close(): Unit = {
- rocksDB.close()
+ if (stateMachine.close()) {
+ rocksDB.close()
+ }
Review Comment:
Is this logic correct? Technically, this new change means there is no way to
close the underlying `rocksDB` from the upper layer,`RocksDBStateStoreProvider`
side.
May I ask why we cannot do like the following if there is a case
`stateMachine.close() == false`?
```scala
stateMachine.close()
rocksDB.close()
```
--
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]