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

Piotr Nowojski commented on FLINK-13013:
----------------------------------------

Yes, but as it is know, it requires that at least one data fetch from the 
{{InputGate}} must happen before one is allowed to check {{isAvailable()}}. 
Which is confusing. Further more, there should be no need to call 
{{requestPartitions()}} once per every buffer fetch.

I'm trying to move {{requestPartitions()}} call from 
{{SingleInputGate#getNextBufferOrEvent}} up to {{SingleInputGate#setup()}}. 
Which solves both of those problems (\{{SingleInputGate#isAvailable}} should 
work always and we avoid costly {{requestPartitions()}} (it acquires 
{{requestLock}}) once per buffer fetch.

> Make sure that SingleInputGate can always request partitions
> ------------------------------------------------------------
>
>                 Key: FLINK-13013
>                 URL: https://issues.apache.org/jira/browse/FLINK-13013
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Network
>            Reporter: Piotr Nowojski
>            Assignee: Piotr Nowojski
>            Priority: Major
>
> Currently {{SingleInputGate}} requests partitions only on the first attempt 
> to fetch the data. Before requesting partitions, no data availability 
> notifications can get through. This doesn't work well with a new non blocking 
> {{InputGate}} interface, since on newly created {{SingleInputGates,}} 
> {{InputGate#isAvailable()}} might return not available, and it will be only 
> able to switch to available, after first call to 
> {{SingleInputGate#pollNext()}}. However this might never happen, since caller 
> could be waiting indefinitely on {{SingleInputGate#isAvailable()}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to