carp84 commented on a change in pull request #14341:
URL: https://github.com/apache/flink/pull/14341#discussion_r580896430
##########
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:
True, it's better not to set new filter if no filter exists at all. Then
the suggested changes are:
1. Make `overwriteFilterIfExist` return a `boolean`
2. Let `getFilterFromBlockBasedTableConfig` throw out the reflection
exception to distinguish it from the no filter existing case.
3. Make `overwriteFilterIfExist` return `true` if the filter is successfully
overwritten or no filter exists, and return `false` if reflection exception
thrown (we don't know whether block based filter is in use and have to disable
partitioned index filter).
What do you think? @liuyufei9527
```suggestion
private boolean overwriteFilterIfExist(BlockBasedTableConfig
blockBasedTableConfig) {
```
----------------------------------------------------------------
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]