[ 
https://issues.apache.org/jira/browse/FLINK-15660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018842#comment-17018842
 ] 

Xintong Song commented on FLINK-15660:
--------------------------------------

Thanks for reporting this issue, [~tedxia].

This is indeed inconsistency caused by concurrent efforts on FLINK-14589 and 
FLINK-14189. To my understanding, the root contradiction is what should 
{{TaskSlotTable::allocateSlot}} return for duplicated allocation id when other 
information (job id, slot index, etc.) is consistent. I think both returning 
true and false should work, as long as the contract of 
{{TaskSlotTable::allocateSlot}} is consistent.

The good news is that, this inconsistent logic does not cause any problem at 
the moment. All we need now is a code clean-up without any behavior changes.

Please help double check on this, [~azagrebin]. Thx~

> Redundant AllocationID verification for allocateSlot in TaskSlotTable
> ---------------------------------------------------------------------
>
>                 Key: FLINK-15660
>                 URL: https://issues.apache.org/jira/browse/FLINK-15660
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.10.0
>            Reporter: xiajun
>            Priority: Major
>         Attachments: image-2020-01-19-15-46-42-664.png
>
>
> !image-2020-01-19-15-46-42-664.png!
>  
> In function TaskSlotTable::allocateSlot, first we will check whether 
> allocationId is exist, when exist we will refused this allocation, this was 
> introduced by FLINK-14589 . But in -FLINK-14189-, when allocationId exist, we 
> think this is valid, which is contradictory which the first check.
>  The code is following:
> [https://github.com/apache/flink/blob/310452e800355f0dcc4bc9dd26e9cecba263f3d6/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L261]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to