carp84 commented on a change in pull request #10329: 
[FLINK-12785][StateBackend] RocksDB savepoint recovery can use a lot of 
unmanaged memory
URL: https://github.com/apache/flink/pull/10329#discussion_r353830704
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
 ##########
 @@ -244,6 +252,8 @@ public RocksDBKeyedStateBackend(
                this.kvStateInformation = kvStateInformation;
 
                this.writeOptions = new WriteOptions().setDisableWAL(true);
+               checkArgument(writeBatchSize >= 0, "Write batch size have to be 
no negative value.");
 
 Review comment:
   Let me confirm, does the `@Nonnull` annotation work out of IntelliJ? In 
previous review I was also suggested to remove null pointer checker with 
`@Nonnull` annotation, maybe this a diverge of code style taste and we should 
make some discussion in ML and mark them down in our code convention?
   
   Another fact is that there're many `@Nonnegative` annotated methods without 
additional checking, like 
[HeapPriorityQueueStateSnapshot](https://github.com/apache/flink/blob/e505bef16c2c11250a2420610c1605a4e64b6d10/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapPriorityQueueStateSnapshot.java#L71),
 
[KeyGroupPartitioner](https://github.com/apache/flink/blob/e505bef16c2c11250a2420610c1605a4e64b6d10/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupPartitioner.java#L108),
 etc. It might be good if we align our code style? Wdyt? 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to