> According to the original PR's motivation
> <https://github.com/apache/bookkeeper/pull/1754>, we wrapped a Netty
> allocator
> and want to configure something through bookkeeper.
> So the user will use our customized allocator and need to obey the rules
> we introduced. Then the Netty's configuration `io.netty.leakDetection.level`
> seems useless for us. I think they would never have a chance to take it
> differently.
> 
> We defined a new configuration property to configure the
> LeakDetectionPolicy.
> 
> 
> 
> 
> *public LeakDetectionPolicy getAllocatorLeakDetectionPolicy() {
> return LeakDetectionPolicy
> .valueOf(this.getString(ALLOCATOR_LEAK_DETECTION_POLICY,
> LeakDetectionPolicy.Paranoid.toString()));    }*
> 
> Some users may don't know the `*ALLOCATOR_LEAK_DETECTION_POLICY`*
> and only configure* `*io.netty.leakDetection.level` to open the leak
> detection.
> I would suggest getting both `*ALLOCATOR_LEAK_DETECTION_POLICY`*
> and `io.netty.leakDetection.level` from the system property, use the highest
> policy of it. And then, no matter how you configured it, the detection
> policy always worked.

Agree.

Reply via email to