rkhachatryan commented on a change in pull request #16168:
URL: https://github.com/apache/flink/pull/16168#discussion_r652473708



##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackendBuilder.java
##########
@@ -363,6 +363,9 @@ private static void checkAndCreateDirectory(File directory) 
throws IOException {
             IOUtils.closeQuietly(optionsContainer);
             
ttlCompactFiltersManager.disposeAndClearRegisteredCompactionFactories();
             kvStateInformation.clear();
+            if (checkpointStrategy != null) {
+                checkpointStrategy.close();

Review comment:
       This call can potentially throw an exception preventing other cleanup 
actions. 
   Those actions here are "safe" (e.g. use `closeQuietly` or `try/catch`). I 
think this call shouldn't throw any exception too. WDYT?
   
   ditto: `RocksDBKeyedStateBackend`
   

##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksDBSnapshotStrategyBase.java
##########
@@ -92,4 +92,6 @@ public RocksDBSnapshotStrategyBase(
     public String getDescription() {
         return description;
     }
+
+    public void close() {}

Review comment:
       NIT: I'd slightly prefer this method to be abstract to force new 
implementors to override it.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to