wsry commented on pull request #13991:
URL: https://github.com/apache/flink/pull/13991#issuecomment-727793009


   @AHeise Thanks for your review and comments.
   
   Your concern is reasonable. I have updated my fix. For current bounded 
partition, only Netty thread can release or poll the subpartition read view so 
we should never poll a released view. In this case, two reasons cause the 
failure: 1) There are redundant data availability notifications; 2) The buffers 
read is not cleared which means the read view can be still available after 
released.
   
   For multi-thread scenario, from my understand, the root failure cause need 
to be propagated to the downstream, if nothing is polled from a read view, we 
will try to find out if the view is released and if there is a failure cause, 
the logic is like this:
   ```
   next = reader.getNextBuffer();
   if (next == null) {
       if (!reader.isReleased()) {
           continue;
       }
   
       Throwable cause = reader.getFailureCause();
       if (cause != null) {
           ErrorResponse msg = new ErrorResponse(new 
ProducerFailedException(cause), reader.getReceiverId());
        ctx.writeAndFlush(msg);
       }
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to