Shilun Fan created RATIS-2405:
---------------------------------

             Summary: Remove duplicate computeIfAbsent call in 
MessageMetrics.inc() method
                 Key: RATIS-2405
                 URL: https://issues.apache.org/jira/browse/RATIS-2405
             Project: Ratis
          Issue Type: Bug
            Reporter: Shilun Fan
            Assignee: Shilun Fan


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