rpuch commented on code in PR #1291:
URL: https://github.com/apache/ignite-3/pull/1291#discussion_r1013028487


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/RocksDbClusterStateStorage.java:
##########
@@ -209,10 +209,10 @@ public void destroy() {
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         IgniteUtils.shutdownAndAwaitTermination(snapshotExecutor, 10, 
TimeUnit.SECONDS);
 
-        IgniteUtils.closeAll(options, db);
+        RocksUtils.closeAll(options, db);

Review Comment:
   The idea of this method is to have ability to close RocksDB references in 
such a way that no `throws` needs to be declared on the `closeAll()` (because 
`AbstractNativeReference`, which implements `AutoCloseable`, does not declare 
any `throws`). On the other hand, a method that accepts `AutoCloseable`s (like 
`IgniteUtils.closeAll()`) or `ManualCloseable` (that you imagined) would have 
to declare `throws Exception` which is what I tried to avoid for RocksDB 
resources. Hence this method.



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