Github user NicoK commented on a diff in the pull request: https://github.com/apache/flink/pull/4552#discussion_r161295428 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SpilledSubpartitionView.java --- @@ -163,6 +190,15 @@ public boolean isReleased() { return parent.isReleased() || isReleased.get(); } + @Override + public boolean nextBufferIsEvent() { + if (nextBuffer != null) { + return !nextBuffer.isBuffer(); + } + + return false; --- End diff -- I'm afraid relying on `nextBuffer` won't be enough because it might not have been there during `getNextBuffer()` but may be there now. Please add a test for this case.
---