[rpc] NettyClient.close() always waits for Netty's 2 s shutdown quiet period
Search before asking
- [x] I searched in the issues and found nothing similar.
Description
NettyClient.close() shuts down its event loop group via NettyUtils.shutdownGroup(), which calls EventLoopGroup.shutdownGracefully() with Netty's defaults (2 s quiet period, 15 s timeout). Every NettyClient.close(), and therefore every Connection.close(), blocks for at least ~2 s, even though all connections are already closed and no more tasks will be submitted.
This adds up in tests, which open and close connections constantly. Example from TieringCommitOperatorTest: every test takes a multiple of ~2.1 s (4.2, 6.3, 8.5, 10.5 s), and the gaps in the logs sit around "Netty client was shutdown successfully."
Proposed fix (client side only): wait for the connection close futures first, then shut down the client event loop group with a zero quiet period. The server side is left as is: removing the quiet period there made cluster shutdown hang in TabletServer.stopServices().
Willingness to contribute
- [x] I'm willing to submit a PR!
Fixed in https://github.com/apache/fluss/pull/4817