-
Notifications
You must be signed in to change notification settings - Fork 40.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default value of spring.netty.leak-detection does not match Netty's default #26958
Conversation
@lfz757077613 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@lfz757077613 Thank you for signing the Contributor License Agreement! |
Thanks for the suggestion. It looks like either the default has changed or the default we've set in #14338 was the wrong one. |
We've set it to the wrong level originally. I'm scheduling this for 2.6.0. |
@lfz757077613 Thanks for raising this issue. I'm not sure I understand your concern here - besides working around this particular issue (to be fixed in 2.5.2), why would you want to exclude this auto-configuration? |
Like you commented on 27 oct 2018, it effect "everything netty". The jvm argument maybe the best practice for the global setting such like it.
Even through I unify the ResourceLeakDetector level setting by using NettyAutoConfiguration, I also need to consider the lifecircle between spring container and other component which also set ResourceLeakDetector level. So I prefer to control the ResourceLeakDetector level by myself. |
Thanks for your comment @lfz757077613 - so you were previously setting that value yourself and you were surprised that Spring Boot is setting it as well. Maybe we should change the current situation so that we don't override a non-default value? Or maybe we should set a Maybe we could add logging statements using the same logger to show that the level has been changed by the application? As for additional properties, we might add new ones if the community makes a good case for them. |
I think default "null" is a good idea, I have modify this pr and add test in NettyAutoConfigurationTests and fix additional-spring-configuration-metadata.json |
Thanks for your contribution @lfz757077613 (both the PR and the discussion). We've discussed this matter and chose to go in a different direction. Because we'd like to ship this change with the next release tomorrow, we're closing this PR and addressing that in #27046. A few things to consider:
I'm closing this PR as a result. Thanks! |
@bclozel Hi, I think additional-spring-configuration-metadata.json is forgot to change the defaultValue in 2.5.2 |
@lfz757077613 Thanks, I've opened #27104 to fix that. |
I use netty to build a tcp server from springboot 2.4.x to 2.5.x and I found the project does not detect memory leak any more.
The NettyAutoConfiguration was added from 2.5.x, and the LeakDetection of NettyProperties is disable.
I think it shoud keep same with netty default ResourceLeakDetector level, otherwise the netty debug log shows its ResourceLeakDetector level is simple, but it is disable actually.
In most situations, we need the default simple ResourceLeakDetector and it works well
By the way, NettyAutoConfiguration seems useless for now, because it only set ResourceLeakDetector. Maybe it will provide more properties in the future?