apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.28k stars 3.59k forks source link

[improve] Improve logic for enabling Netty leak detection #23613

Closed lhotari closed 4 days ago

lhotari commented 5 days ago

Motivation

Currently it's tricky and confusing to enable the Netty leak detector for Pulsar broker and Pulsar clients.

The current logic expects that pulsar.allocator.leak_detection is set. The standard property for Netty is io.netty.leakDetection.level (legacy property io.netty.leakDetectionLevel).

One additional challenge in setting the pulsar.allocator.leak_detection property is that the value is case sensitive. It must be set to Disabled, Simple, Advanced or Paranoid instead of disabled, simple, advanced or paranoid.

Modifications

Documentation

codecov-commenter commented 5 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.37%. Comparing base (bbc6224) to head (6d7cc65). Report is 743 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/23613/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/23613?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #23613 +/- ## ============================================ + Coverage 73.57% 74.37% +0.80% - Complexity 32624 34987 +2363 ============================================ Files 1877 1944 +67 Lines 139502 147134 +7632 Branches 15299 16224 +925 ============================================ + Hits 102638 109438 +6800 - Misses 28908 29253 +345 - Partials 7956 8443 +487 ``` | [Flag](https://app.codecov.io/gh/apache/pulsar/pull/23613/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [inttests](https://app.codecov.io/gh/apache/pulsar/pull/23613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.52% <100.00%> (+2.93%)` | :arrow_up: | | [systests](https://app.codecov.io/gh/apache/pulsar/pull/23613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.36% <100.00%> (+0.03%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pulsar/pull/23613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.76% <100.00%> (+0.91%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/23613?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...ulsar/common/allocator/PulsarByteBufAllocator.java](https://app.codecov.io/gh/apache/pulsar/pull/23613?src=pr&el=tree&filepath=pulsar-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fcommon%2Fallocator%2FPulsarByteBufAllocator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi9hbGxvY2F0b3IvUHVsc2FyQnl0ZUJ1ZkFsbG9jYXRvci5qYXZh) | `68.29% <100.00%> (+5.43%)` | :arrow_up: | ... and [660 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/23613/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)

🚨 Try these New Features: