-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[improve][ci] Add Netty leak detection reporting to Pulsar CI #24272
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
[improve][ci] Add Netty leak detection reporting to Pulsar CI #24272
Conversation
dev mailing list thread: https://lists.apache.org/thread/fh63hg31womzr64bc7djv3sovgcx6z99 |
…etection-to-tests-and-ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #24272 +/- ##
============================================
+ Coverage 73.57% 74.25% +0.67%
+ Complexity 32624 32615 -9
============================================
Files 1877 1866 -11
Lines 139502 145054 +5552
Branches 15299 16580 +1281
============================================
+ Hits 102638 107706 +5068
+ Misses 28908 28835 -73
- Partials 7956 8513 +557
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The overhead of adding Netty leak detection is negligible. In some jobs there's a 30% increase, but this is based on a single run. There's a lot of variance in build times in GitHub Actions CI, perhaps due to "noisy neighbors". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Leave a small comment.
(cherry picked from commit f51123c)
Motivation
Memory leaks in Netty buffers can lead to performance degradation, resource exhaustion, and unpredictable failures in production. A key challenge we face is that these leaks often go undetected until they cause issues in production environments.
Currently, our CI pipeline lacks the capability to systematically detect and prevent Netty buffer leaks before they reach production code. This creates a significant blind spot that allows buffer leak regressions to slip through our quality gates. This PR addresses this gap by implementing advanced Netty leak detection capabilities within the Pulsar CI pipeline.
The implementation follows a staged approach:
This approach will allow us to establish a clean baseline and create an automated safety net that prevents future regressions in Netty buffer management. By catching these issues early in the development cycle, we can significantly improve system stability and resource efficiency in production environments.
Modifications
ExtendedNettyLeakDetector
implementation that extends Netty'sResourceLeakDetector
NETTY_LEAK_DUMP_DIR
)PulsarTestListener
to trigger leak detection at key test lifecycle eventsDocumentation
doc
doc-required
doc-not-needed
doc-complete