You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/11/27 07:05:15 UTC

[GitHub] [flink] klion26 opened a new pull request #10329: [FLINK-12785][StateBackend] RocksDB savepoint recovery can use a lot of unmanaged memory

klion26 opened a new pull request #10329: [FLINK-12785][StateBackend] RocksDB savepoint recovery can use a lot of unmanaged memory
URL: https://github.com/apache/flink/pull/10329
 
 
   
   ## What is the purpose of the change
   
   Currently `RocksDBWriteBatchWrapper` will flush the batch just based on item count, will consume too much memory for big kv.
   This PR will add consumed memory sized based control policy, will flush the batch either item count or consumed memory size exceeds the configured value.
   
   ## Brief change log
   
   - Add a configuration `state.backend.rocksdb.write-batch-size` in `ROcksDBCOnfigurableOptions` to set the batchSize, default 2mb
   - Add logic to flush write batch after consumed memory size exceeds the preconfiged value.
   
   
   ## Verifying this change
   
   
   This change added tests and can be verified as follows:
   
   - `RocksDBWriteBatchWrapperTest#testWriteBatchWrapperFlushAfterMemorySizeExceed` to test that the batch will flush after consumed memory exceeds the preconfigured value
    - `RocksDBWriteBatchWrapperTest#testWriteBatchWrapperFlushAfterCountExceed` to test that the batch will flush after item count exceeds the preconfigured value
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (docs)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services