carp84 commented on a change in pull request #14341:
URL: https://github.com/apache/flink/pull/14341#discussion_r579261081



##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBResourceContainer.java
##########
@@ -207,4 +221,37 @@ public void close() throws Exception {
             sharedResources.close();
         }
     }
+
+    /**
+     * Overwrite configured {@link Filter} if enable partitioned filter. 
Partitioned filter only
+     * worked in full bloom filter, not blocked based.
+     */
+    private void overwriteFilterIfExist(BlockBasedTableConfig 
blockBasedTableConfig) {

Review comment:
       Suggest to directly overwrite the filter no matter what its original 
type is, since full bloom filters is a necessity to enable partitioned filter, 
and the `handlesToClose` collection will make sure the old filter will be 
closed w/o resource leak (only delayed).
   
   What's more, it's hard to handle the case of failing to get filter from 
table config through reflection, and we cannot let it through silently since 
the unknown filter type might be block based.




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