[ https://issues.apache.org/jira/browse/FLINK-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16212552#comment-16212552 ]
ASF GitHub Bot commented on FLINK-7832: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4823#discussion_r145948519 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java --- @@ -418,26 +415,17 @@ public void freeSlot(SlotID slotId, AllocationID allocationId) { TaskManagerSlot slot = slots.get(slotId); if (null != slot) { - if (slot.isAllocated()) { + if (slot.getState() == TaskManagerSlot.State.ALLOCATED) { if (Objects.equals(allocationId, slot.getAllocationId())) { - // free the slot - slot.setAllocationId(null); - fulfilledSlotRequests.remove(allocationId); - - if (slot.isFree()) { - handleFreeSlot(slot); - } TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); - if (null != taskManagerRegistration) { - if (anySlotUsed(taskManagerRegistration.getSlots())) { - taskManagerRegistration.markUsed(); - } else { - taskManagerRegistration.markIdle(); - } + if (taskManagerRegistration == null) { + throw new IllegalStateException("Trying to free a slot from a TaskManager " + --- End diff -- Yes, will add it. > 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)