xintongsong commented on a change in pull request #9105: [FLINK-13241][Yarn/Mesos] Fix Yarn/MesosResourceManager setting managed memory size into wrong configuration instance. URL: https://github.com/apache/flink/pull/9105#discussion_r307812100
########## File path: flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ########## @@ -184,7 +183,9 @@ public YarnResourceManager( this.defaultCpus = flinkConfig.getInteger(YarnConfigOptions.VCORES, numberOfTaskSlots); this.resource = Resource.newInstance(defaultTaskManagerMemoryMB, defaultCpus); - this.slotsPerWorker = updateTaskManagerConfigAndCreateWorkerSlotProfiles(flinkConfig, defaultTaskManagerMemoryMB, numberOfTaskSlots); + this.defaultTaskManagerParameters = ContaineredTaskManagerParameters.create(flinkConfig, defaultTaskManagerMemoryMB, numberOfTaskSlots); Review comment: Yes, the `createTaskExecutorLaunchContext ` recreates a `ContaineredTaskManagerParameters`, but with the actual container memory allocated by Yarn, which could be slightly larger than requested. Reusing the same `ContaineredTaskManagerParameters` instance prevents task managers from making use of the extra allocated memory, which could be a user aware behavior change compare to the current behavior. I think maybe we should not introduce such behavior change in this version, since we are going to change resource configuration and management anyway in the next version. ---------------------------------------------------------------- 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