SteNicholas opened a new pull request, #2369:
URL: https://github.com/apache/incubator-celeborn/pull/2369

   ### What changes were proposed in this pull request?
   
   Should close the `RocksDB`/`LevelDB` instance when `checkVersion` throw 
Exception.
   
   Backport [[SPARK-46389][CORE] Manually close the RocksDB/LevelDB instance 
when checkVersion throw Exception](https://github.com/apache/spark/pull/44327).
   
   ### Why are the changes needed?
   
   In the process of initializing the DB in 
`RocksDBProvider`/`LevelDBProvider`, there is a `checkVersion` step that may 
throw an exception. After the exception is thrown, the upper-level caller 
cannot hold the already opened RockDB/LevelDB instance, so it cannot perform 
resource cleanup, which poses a potential risk of handle leakage. So this PR 
manually closes the `RocksDB`/`LevelDB` instance when `checkVersion` throws an 
exception.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   CI.


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

Reply via email to