Github user NicoK commented on a diff in the pull request: https://github.com/apache/flink/pull/4581#discussion_r152842686 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartition.java --- @@ -95,20 +95,23 @@ public boolean add(Buffer buffer) throws IOException { return false; } - // The number of buffers are needed later when creating - // the read views. If you ever remove this line here, - // make sure to still count the number of buffers. - updateStatistics(buffer); - if (spillWriter == null) { buffers.add(buffer); + // The number of buffers are needed later when creating + // the read views. If you ever remove this line here, + // make sure to still count the number of buffers. --- End diff -- yes, all my new tests verify these numbers via ``` assertEquals(..., partition.getTotalNumberOfBuffers()); assertEquals(..., partition.getTotalNumberOfBytes()); ``` but I'll add some more of those checks to some existing tests
---