StephanEwen commented on a change in pull request #8704: [FLINK-12812][runtime]
Set resource profiles for task slots
URL: https://github.com/apache/flink/pull/8704#discussion_r300070791
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
##########
@@ -585,7 +585,8 @@ private TaskManagerSlot
createAndRegisterTaskManagerSlot(SlotID slotId, Resource
@Nullable
private PendingTaskManagerSlot
findExactlyMatchingPendingTaskManagerSlot(ResourceProfile resourceProfile) {
for (PendingTaskManagerSlot pendingTaskManagerSlot :
pendingSlots.values()) {
- if
(pendingTaskManagerSlot.getResourceProfile().equals(resourceProfile)) {
+ // there might be slight error between slot resource
profiles calculated by RM / TM
+ if
(pendingTaskManagerSlot.getResourceProfile().approximate(resourceProfile)) {
Review comment:
Why does the RM re-calculate the resource profile? This assumes that the RM
and TM not only follow the same rules, but have the same config. That is
actually not always the case, I have seen standalone setups where different TMs
had different configs.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services