Github user zhijiangW commented on the issue: https://github.com/apache/flink/pull/4509 @NicoK , I have fixed the other code issues. For UT, I only added one test for verifying there is no race condition between requesting and recycling floating buffers. I am not sure whether to control the process by `CountDownLatch` is enough. Or I should submit two different threads to execute the process repeated. If this way is ok, I will add more tests for race condition along with `NetworkBufferPool#createBufferPool()` modifications you suggested. For fair distribution of buffers test, I will add one test, maybe in this PR or in #4735 later.
---