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:26:19 UTC

[GitHub] [flink] SteNicholas opened a new pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

SteNicholas opened a new pull request #12551:
URL: https://github.com/apache/flink/pull/12551


   ## What is the purpose of the change
   
   *Log of method `deriveFromRequiredFineGrainedOptions` in `JobManagerFlinkMemoryUtils` isn't consistent with the condtion which is `derivedTotalFlinkMemorySize.getBytes() != totalFlinkMemorySize.getBytes()`. This condition should be `derivedTotalFlinkMemorySize.getBytes() > totalFlinkMemorySize.getBytes()`.*
   
   ## Brief change log
   
     - *Modify the log condition of `deriveFromRequiredFineGrainedOptions` to `derivedTotalFlinkMemorySize.getBytes() > totalFlinkMemorySize.getBytes()`.*
   
   ## Verifying this change
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   


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



[GitHub] [flink] azagrebin commented on a change in pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #12551:
URL: https://github.com/apache/flink/pull/12551#discussion_r437514848



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
##########
@@ -41,9 +41,8 @@ public JobManagerFlinkMemory deriveFromRequiredFineGrainedOptions(Configuration
 		MemorySize derivedTotalFlinkMemorySize = jvmHeapMemorySize.add(offHeapMemorySize);
 
 		if (config.contains(JobManagerOptions.TOTAL_FLINK_MEMORY)) {
-			// derive network memory from total flink memory, and check against network min/max
 			MemorySize totalFlinkMemorySize = ProcessMemoryUtils.getMemorySizeFromConfig(config, JobManagerOptions.TOTAL_FLINK_MEMORY);
-			if (derivedTotalFlinkMemorySize.getBytes() != totalFlinkMemorySize.getBytes()) {
+			if (derivedTotalFlinkMemorySize.getBytes() > totalFlinkMemorySize.getBytes()) {

Review comment:
       The check is correct in this case, the message is wrong, it should `does not match` instead of `exceeds`.
   This has been fixed in https://github.com/apache/flink/pull/12557/files#diff-4ccfda6492f20dce963a7fa12cc240ebR65.
   Therefore, I suggest to close this PR for now.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
##########
@@ -41,9 +41,8 @@ public JobManagerFlinkMemory deriveFromRequiredFineGrainedOptions(Configuration
 		MemorySize derivedTotalFlinkMemorySize = jvmHeapMemorySize.add(offHeapMemorySize);
 
 		if (config.contains(JobManagerOptions.TOTAL_FLINK_MEMORY)) {
-			// derive network memory from total flink memory, and check against network min/max
 			MemorySize totalFlinkMemorySize = ProcessMemoryUtils.getMemorySizeFromConfig(config, JobManagerOptions.TOTAL_FLINK_MEMORY);
-			if (derivedTotalFlinkMemorySize.getBytes() != totalFlinkMemorySize.getBytes()) {
+			if (derivedTotalFlinkMemorySize.getBytes() > totalFlinkMemorySize.getBytes()) {

Review comment:
       The check is correct in this case, the message is wrong, it should be `does not match` instead of `exceeds`.
   This has been fixed in https://github.com/apache/flink/pull/12557/files#diff-4ccfda6492f20dce963a7fa12cc240ebR65.
   Therefore, I suggest to close this PR for now.




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



[GitHub] [flink] flinkbot commented on pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12551:
URL: https://github.com/apache/flink/pull/12551#issuecomment-641267002






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



[GitHub] [flink] SteNicholas edited a comment on pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
SteNicholas edited a comment on pull request #12551:
URL: https://github.com/apache/flink/pull/12551#issuecomment-641274731


   @zentol @azagrebin Could you please help to review this minor changes?


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



[GitHub] [flink] SteNicholas commented on pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #12551:
URL: https://github.com/apache/flink/pull/12551#issuecomment-641274731


   @zentol Could you please help to review this minor changes?


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



[GitHub] [flink] SteNicholas closed pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
SteNicholas closed pull request #12551:
URL: https://github.com/apache/flink/pull/12551


   


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



[GitHub] [flink] flinkbot edited a comment on pull request #12551: [FLINK-18189][runtime] Incorrect size check for sum of heap/non-heap memory

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12551:
URL: https://github.com/apache/flink/pull/12551#issuecomment-641276872


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "367a8ae097b2e0e1e068926456f1c75084c2a441",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3063",
       "triggerID" : "367a8ae097b2e0e1e068926456f1c75084c2a441",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 367a8ae097b2e0e1e068926456f1c75084c2a441 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3063) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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