[ https://issues.apache.org/jira/browse/FLINK-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16207635#comment-16207635 ]
ASF GitHub Bot commented on FLINK-7832: --------------------------------------- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/4823#discussion_r145117281 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java --- @@ -556,14 +537,30 @@ private void registerSlot( * @return True if the slot could be updated; otherwise false */ private boolean updateSlot(SlotID slotId, AllocationID allocationId) { - TaskManagerSlot slot = slots.get(slotId); + final TaskManagerSlot slot = slots.get(slotId); - if (null != slot) { - // we assume the given allocation id to be the ground truth (coming from the TM) - slot.setAllocationId(allocationId); + if (slot != null) { + final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); + + if (taskManagerRegistration != null) { + updateSlotInternal(slot, taskManagerRegistration, allocationId); + + return true; + } else { + throw new IllegalStateException("Trying to update a slot from a TaskManager " + --- End diff -- same as above > SlotManager should return number of registered slots > ---------------------------------------------------- > > Key: FLINK-7832 > URL: https://issues.apache.org/jira/browse/FLINK-7832 > Project: Flink > Issue Type: Improvement > Components: Distributed Coordination > Affects Versions: 1.4.0 > Reporter: Till Rohrmann > Assignee: Till Rohrmann > Labels: flip-6 > Fix For: 1.4.0 > > > The {{SlotManager}} should provide information about the number of registered > slots for a {{TaskExecutor}} and how many of these slots are still free. -- This message was sent by Atlassian JIRA (v6.4.14#64029)