Github user pnowojski commented on a diff in the pull request: https://github.com/apache/flink/pull/4581#discussion_r148532775 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionTest.java --- @@ -192,21 +198,39 @@ public void testConsumeSpilledPartition() throws Exception { Buffer read = reader.getNextBuffer(); assertNotNull(read); + assertNotSame(buffer, read); + assertFalse(read.isRecycled()); read.recycle(); + assertTrue(read.isRecycled()); read = reader.getNextBuffer(); assertNotNull(read); + assertNotSame(buffer, read); + assertFalse(read.isRecycled()); read.recycle(); + assertTrue(read.isRecycled()); --- End diff -- Are those `read.isRecycled()` checks somehow related to this change/fix? Or just additional side hotfix? If the latter one, I would prefer to have them in separate commit because they are confusing me.
---