[
https://issues.apache.org/jira/browse/FLINK-23117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17368565#comment-17368565
]
zhouzhengde commented on FLINK-23117:
-------------------------------------
Supplement:
In the cloud server environment, the following error will appear when
submitting a job: "org. Apache. Flink. Util. Flinkexception: taskexecutor akka
tcp://[email protected] :40265/user/rpc/taskmanager_ 0 has no more allocated
slots for job ", but there are still unused taskslots in the system.
Taskslot is not used by the current job, which does not mean that it is
occupied by other jobs. It has other intermediate states.
In the future, I will pay attention to whether this will bring negative
effects. Now I will temporarily close this issue. Thank you.
> TaskExecutor.allocateSlot is a logical error
> --------------------------------------------
>
> Key: FLINK-23117
> URL: https://issues.apache.org/jira/browse/FLINK-23117
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Task
> Affects Versions: 1.12.0, 1.12.2, 1.13.0, 1.13.1
> Reporter: zhouzhengde
> Priority: Minor
>
> (commit: 2020-04-22)TaskExecutor.allocateSlot at line 1109 has a logical
> error. Use '!taskSlotTable.isAllocated(slotId.getSlotNumber(), jobId,
> allocationId)' to judge TaskSlot is used by another job that is not correct.
> if slot index not occupy, that will be have some problem. Please confirm that
> is correct. The issue code follow:
> - TaskExecutor.java
> ```java
> {color:red}} else if (!taskSlotTable.isAllocated(slotId.getSlotNumber(),
> jobId, allocationId)) {{color}
> final String message =
> "The slot " + slotId + " has already been allocated for a different job.";
> log.info(message);
> final AllocationID allocationID =
> taskSlotTable.getCurrentAllocation(slotId.getSlotNumber());
> throw new SlotOccupiedException(
> message, allocationID, taskSlotTable.getOwningJob(allocationID));
> }
> ```
> - TaskSlotTableImpl.java
> ```java
> @Override
> public boolean isAllocated(int index, JobID jobId, AllocationID
> allocationId) {
> TaskSlot<T> taskSlot = taskSlots.get(index);
> if (taskSlot != null) {
> return taskSlot.isAllocated(jobId, allocationId);
> } else {
> return false;
> }
> }
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)