rkhachatryan commented on code in PR #21778:
URL: https://github.com/apache/flink/pull/21778#discussion_r1091781276


##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMemoryControllerUtils.java:
##########
@@ -168,4 +170,26 @@ static long calculateRocksDBMutableLimit(long bufferSize) {
     static boolean validateArenaBlockSize(long arenaBlockSize, long 
mutableLimit) {
         return arenaBlockSize <= mutableLimit;
     }
+
+    /** Factory for Write Buffer Manager and Bock Cache. */
+    public interface RocksDBMemoryFactory extends Serializable {
+        Cache createCache(long cacheCapacity, double highPriorityPoolRatio);
+
+        WriteBufferManager createWriteBufferManager(long 
writeBufferManagerCapacity, Cache cache);
+
+        RocksDBMemoryFactory DEFAULT =
+                new RocksDBMemoryFactory() {
+                    @Override
+                    public Cache createCache(long cacheCapacity, double 
highPriorityPoolRatio) {
+                        // TODO use strict capacity limit until FLINK-15532 
resolved
+                        return new LRUCache(cacheCapacity, -1, false, 
highPriorityPoolRatio);

Review Comment:
   No good reason, I'll change this method to call 
`RocksDBMemoryControllerUtils.createCache`. Thanks.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to