Github user NicoK commented on a diff in the pull request: https://github.com/apache/flink/pull/6238#discussion_r199702444 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java --- @@ -147,7 +151,12 @@ public void recycle(MemorySegment segment) { this.numTotalRequiredBuffers += numRequiredBuffers; - redistributeBuffers(); + try { + redistributeBuffers(); + } catch (Throwable t) { + this.numTotalRequiredBuffers -= numRequiredBuffers; + ExceptionUtils.rethrowIOException(t); + } } final List<MemorySegment> segments = new ArrayList<>(numRequiredBuffers); --- End diff -- ah, true, thanks for pointing this out, I must have been blind on one eye yesterday I'll integrate this change as well
---