wpc009 commented on pull request #18475: URL: https://github.com/apache/flink/pull/18475#issuecomment-1024054444
> > @wpc009 . Could you check my PR if it's solving the memory leak? My proposal is quite a bit simpler. > > Regarding the tests, unfortunately I don't see a way for providing a fast and reliable unit test/itcase. The only idea I have is some longer running stress test, but... > > Can you provide a steps to reproduce the problem and what JDK version are you using? I've tried running your tests, I have even tried to reproduce the problem on my own, and I could not observe this memory, even after 20 minutes of running a job that should have created a new leaked `CompletableFuture` every ~1ms. The number of `CompletableFuture` (and it's inner classes) remained more or less constant (oscillating a lot, but without a clear upward trend). You may not see a clear upward trend with large network buffer. Since we need the input switch between AVAILABLE and UNAVAILABLE quickly. You can try to reduce the network buffer size, and increase the high-througput input message rates. You will see lots of im-collectable `CompletableFuture` and `UniRun` instances. For a normal production environment, it may takes around 1 hour to ran out of memory. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org