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

ASF GitHub Bot commented on FLINK-8694:
---------------------------------------

Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5572#discussion_r170557786
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
 ---
    @@ -428,13 +455,15 @@ private static SingleInputGate createInputGate(int 
numberOfInputChannels) {
        }
     
        static void verifyBufferOrEvent(
    -           InputGate inputGate,
    -           boolean isBuffer,
    -           int channelIndex) throws IOException, InterruptedException {
    +                   InputGate inputGate,
    +                   boolean expectedIsBuffer,
    +                   int expectedChannelIndex,
    +                   boolean expectedMoreAvailable) throws IOException, 
InterruptedException {
     
                final Optional<BufferOrEvent> bufferOrEvent = 
inputGate.getNextBufferOrEvent();
                assertTrue(bufferOrEvent.isPresent());
    -           assertEquals(isBuffer, bufferOrEvent.get().isBuffer());
    -           assertEquals(channelIndex, 
bufferOrEvent.get().getChannelIndex());
    +           assertEquals(expectedIsBuffer, bufferOrEvent.get().isBuffer());
    +           assertEquals(expectedChannelIndex, 
bufferOrEvent.get().getChannelIndex());
    +           assertEquals(expectedMoreAvailable, 
bufferOrEvent.get().moreAvailable());
    --- End diff --
    
    Can we also verify 
`assertFalse(inputGate.pollNextBufferOrEvent().isPresent());` for 
`SingleInputGate` instances here? (ideally also for any other input gate, once 
`UnionInputGate` implements this.


> Make notifyDataAvailable call reliable
> --------------------------------------
>
>                 Key: FLINK-8694
>                 URL: https://issues.apache.org/jira/browse/FLINK-8694
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Piotr Nowojski
>            Assignee: Piotr Nowojski
>            Priority: Blocker
>
> After FLINK-8591 
> org.apache.flink.runtime.io.network.netty.SequenceNumberingViewReader#notifyDataAvailable
>  (and the same for Credit base flow control) due to race condition can be 
> sometimes ignored. 



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

Reply via email to