[ 
https://issues.apache.org/jira/browse/RATIS-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze resolved RATIS-2412.
-------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

The pull request is now merged.  Thanks, [~slfan1989]!

> NettyClient LoggingHandler not working
> --------------------------------------
>
>                 Key: RATIS-2412
>                 URL: https://issues.apache.org/jira/browse/RATIS-2412
>             Project: Ratis
>          Issue Type: Bug
>          Components: Netty
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>             Fix For: 3.3.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> In `NettyClient.connect()` method, `Bootstrap.handler()` is called twice 
> consecutively, which causes the `LoggingHandler` to be overridden and not 
> take effect.
>  
> We can confirm this by looking at the Netty source code.
>  
> ```
> public B handler(ChannelHandler handler) {
>     this.handler = ObjectUtil.checkNotNull(handler, "handler");
>     return self();
> }
> ```
>  
> Bootstrap has only one handler field internally. Every time we call the 
> `handler()` method, it directly `overwrites` the previously set value instead 
> of `accumulating / adding` to it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to