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

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

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

> Remove duplicate computeIfAbsent call in MessageMetrics.inc() method
> --------------------------------------------------------------------
>
>                 Key: RATIS-2405
>                 URL: https://issues.apache.org/jira/browse/RATIS-2405
>             Project: Ratis
>          Issue Type: Improvement
>          Components: gRPC
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>             Fix For: 3.3.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> h3. Problem
> The {{MessageMetrics.inc()}} method contains duplicate code that calls twice 
> for the same key, along with an unnecessary synchronized block.
> This leads to: {{computeIfAbsent}}
>  # Redundant map lookups
>  # Code duplication and poor readability
>  # Potential performance overhead



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

Reply via email to