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 2020/06/09 16:42:03 UTC

[GitHub] [flink] zentol commented on a change in pull request #12516: [FLINK-18157][runtime] Jobstore size check compares against offHeapMemory

zentol commented on a change in pull request #12516:
URL: https://github.com/apache/flink/pull/12516#discussion_r436776245



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
##########
@@ -75,12 +75,12 @@ private static JobManagerFlinkMemory createJobManagerFlinkMemory(
 			MemorySize jvmHeap,
 			MemorySize offHeapMemory) {
 		verifyJvmHeapSize(jvmHeap);
-		verifyJobStoreCacheSize(config, offHeapMemory);
+		verifyJobStoreCacheSize(config, jvmHeap);
 		return new JobManagerFlinkMemory(jvmHeap, offHeapMemory);
 	}
 
 	private static void verifyJvmHeapSize(MemorySize jvmHeapSize) {
-		if (jvmHeapSize.compareTo(JobManagerOptions.MIN_JVM_HEAP_SIZE) < 1) {
+		if (jvmHeapSize.compareTo(JobManagerOptions.MIN_JVM_HEAP_SIZE) < 0) {

Review comment:
       +1 for using 0; otherwise you can run into the following error which will always be perceived as an oversight:
   `The configured or derived JVM heap memory size (128.000mb (134217728 bytes)) is less than its recommended minimum value (128 mb)`




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