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

Chesnay Schepler commented on FLINK-20748:
------------------------------------------

The name doesn't seem appropriate; a change in requirements does not not imply 
a change for a slot.

I also don't think you can just call a common method for both cases without 
throwing away some optimization potential;
- if a slot is freed you only need to check whether this very slot can fulfill 
any other requirement; all other slots are irrelevant
- if a requirement is increased you only need to check whether this very 
requirement can be fulfilled by any excess slot; all other requirements are 
irrelevant
- if a requirement is reduced you need to check whether this results in excess 
free slots, and if so go through the process for freed slots.

A simpler approach might be to try this remapping when a slot is about to be 
released due to being idle; you may want to look into that.


> Remap excess slots to outstanding requirements
> ----------------------------------------------
>
>                 Key: FLINK-20748
>                 URL: https://issues.apache.org/jira/browse/FLINK-20748
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Coordination
>    Affects Versions: 1.13.0
>            Reporter: Chesnay Schepler
>            Priority: Major
>             Fix For: 1.13.0
>
>
> The {{DeclarativeSlotPool}} maintains a mapping of slots to requirements that 
> they fulfill.   This mapping is currently determined when the slot is offered 
> to the pool, and is only modified if the scheduler reserves this slot for a 
> different requirement.
> This currently implies 2 things:
>  * a slot can be prematurely released, although it could fulfill a different 
> outstanding requirement
>  * a new slot could be requested, despite there being another slot around 
> that could fulfill the requirement
> We should remedy this by checking whether excess slots can be re-mapped to a 
> different requirement, whenever the requirements change or a slot is freed.



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

Reply via email to