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

    https://github.com/apache/flink/pull/2690#discussion_r85299971
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java
 ---
    @@ -108,15 +108,25 @@ private void sendToTarget(T record, int 
targetChannel) throws IOException, Inter
     
                synchronized (serializer) {
                        SerializationResult result = 
serializer.addRecord(record);
    +
                        while (result.isFullBuffer()) {
                                Buffer buffer = serializer.getCurrentBuffer();
     
                                if (buffer != null) {
    -                                   writeBuffer(buffer, targetChannel, 
serializer);
    +                                   writeAndClearBuffer(buffer, 
targetChannel, serializer);
    +
    +                                   // If this was a full record, we are 
done. Not breaking
    +                                   // out of the loop at this point will 
lead to another
    +                                   // buffer request before breaking out 
(that would not be
    +                                   // a problem per se, but it can lead to 
stalls in the
    +                                   // pipeline).
    +                                   if (result.isFullRecord()) {
    +                                           break;
    --- End diff --
    
    Yes, exactly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to