Myasuka commented on a change in pull request #16371:
URL: https://github.com/apache/flink/pull/16371#discussion_r663809351



##########
File path: docs/content/docs/ops/state/state_backends.md
##########
@@ -293,29 +293,38 @@ Below is an example how to define a custom 
ConfigurableOptionsFactory (set class
 ```java
 
 public class MyOptionsFactory implements ConfigurableRocksDBOptionsFactory {
-
     private static final long DEFAULT_SIZE = 256 * 1024 * 1024;  // 256 MB
-    private long blockCacheSize = DEFAULT_SIZE;
 
+    public static final ConfigOption<MemorySize> BLOCK_CACHE_SIZE = 
ConfigOptions
+            .key("my.custom.rocksdb.block.cache.size")

Review comment:
       Since block cache size has been introduced in standard Flink's rocksDB 
configuration, I think another option might be better (such as 
`setBlockRestartInterval`).

##########
File path: docs/content.zh/docs/ops/state/state_backends.md
##########
@@ -233,7 +233,7 @@ Flink还提供了两个参数来控制*写路径*(MemTable)和*读路径*(
 
   - `state.backend.rocksdb.memory.write-buffer-ratio`,默认值 `0.5`,即 50% 
的给定内存会分配给写缓冲区使用。
   - `state.backend.rocksdb.memory.high-prio-pool-ratio`,默认值 `0.1`,即 10% 的 
block cache 内存会优先分配给索引及过滤器。
-  
我们强烈建议不要将此值设置为零,以防止索引和过滤器被频繁踢出缓存而导致性能问题。此外,我们默认将L0级的过滤器和索引将被固定到缓存中以提高性能,更多详细信息请参阅
 [RocksDB 
文档](https://github.com/facebook/rocksdb/wiki/Block-Cache#caching-index-filter-and-compression-dictionary-blocks)。
+    
我们强烈建议不要将此值设置为零,以防止索引和过滤器被频繁踢出缓存而导致性能问题。此外,我们默认将L0级的过滤器和索引将被固定到缓存中以提高性能,更多详细信息请参阅
 [RocksDB 
文档](https://github.com/facebook/rocksdb/wiki/Block-Cache#caching-index-filter-and-compression-dictionary-blocks)。

Review comment:
       I don't think we need to change this line in this PR.

##########
File path: docs/content.zh/docs/ops/state/state_backends.md
##########
@@ -283,7 +283,7 @@ Flink还提供了两个参数来控制*写路径*(MemTable)和*读路径*(
   - 通过 `state.backend.rocksdb.options-factory` 选项将工厂实现类的名称设置到`flink-conf.yaml` 
。
   
   - 通过程序设置,例如 `RocksDBStateBackend.setRocksDBOptions(new MyOptionsFactory());` 
。
-  
+

Review comment:
       The same as above. I don't think we need to change this line in this PR.




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