GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — Notify `LeakListener` for every detected leak by gavinbunney · Pull Request #18324 · netty/netty Conversation
|
✅ All tests passed ✅🏷️ Commit: 5292eaf Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Auto-port PR for 4.1: #18334 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Auto-port PR for 5.0: #18335 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Motivation: The auto-port of #18324 uses lambdas in ResourceLeakDetectorTest, which are not supported by the Java 6 baseline of the 4.1 branch. Modification: Replace the lambdas with anonymous LeakListener implementations. Result: The test compiles on 4.1.
Auto-port of #18324 to 5.0 Cherry-picked commit: bc5f605 --- Motivation: `ResourceLeakDetector` invokes `LeakListener` inside duplicate-log suppression, so repeated leaks with the same report produce only one callback. Applications using the listener for a leak counter therefore count distinct logged reports rather than detected leaks. Zuul's [InstrumentedResourceLeakDetector](https://github.com/Netflix/zuul/blob/908894af8cae9a2aed27761a5c8cde8672fdc32d/zuul-core/src/main/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetector.java#L48-L73) increments its metric from the report hooks and clears Netty's private `reportedLeaks` field through reflection to count duplicates. Modification: This PR notifies the listener for each detected leak independently of log deduplication and logging being enabled. Duplicate log reports remain suppressed, and the queue-clearing path remains when neither logging nor a listener needs the report. Result: Listeners are able to process each detected leaks without repeated log output or reflection. No public API addition. Co-authored-by: Gavin Bunney <[email protected]>
Auto-port of #18324 to 4.1 Cherry-picked commit: bc5f605 --- Motivation: `ResourceLeakDetector` invokes `LeakListener` inside duplicate-log suppression, so repeated leaks with the same report produce only one callback. Applications using the listener for a leak counter therefore count distinct logged reports rather than detected leaks. Zuul's [InstrumentedResourceLeakDetector](https://github.com/Netflix/zuul/blob/908894af8cae9a2aed27761a5c8cde8672fdc32d/zuul-core/src/main/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetector.java#L48-L73) increments its metric from the report hooks and clears Netty's private `reportedLeaks` field through reflection to count duplicates. Modification: This PR notifies the listener for each detected leak independently of log deduplication and logging being enabled. Duplicate log reports remain suppressed, and the queue-clearing path remains when neither logging nor a listener needs the report. Result: Listeners are able to process each detected leaks without repeated log output or reflection. No public API addition. --------- Co-authored-by: Gavin Bunney <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.