This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.2 by this push:
     new ccf7b7b7db fix invocation.getServiceKey maybe null (#12425)
ccf7b7b7db is described below

commit ccf7b7b7dbe0d7f7f2891e580b4f655082c46fb7
Author: wxbty <[email protected]>
AuthorDate: Tue May 30 10:37:15 2023 +0800

    fix invocation.getServiceKey maybe null (#12425)
---
 .../src/main/java/org/apache/dubbo/metrics/data/RtStatComposite.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/data/RtStatComposite.java
 
b/dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/data/RtStatComposite.java
index b49a2864c7..a6e7a681d2 100644
--- 
a/dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/data/RtStatComposite.java
+++ 
b/dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/data/RtStatComposite.java
@@ -94,7 +94,7 @@ public class RtStatComposite extends AbstractMetricsExport {
 
     public void calcMethodKeyRt(Invocation invocation, String registryOpType, 
Long responseTime) {
         for (LongContainer container : rtStats.stream().filter(longContainer 
-> longContainer.specifyType(registryOpType)).collect(Collectors.toList())) {
-            Number current = (Number) 
ConcurrentHashMapUtils.computeIfAbsent(container, invocation.getServiceName() + 
"_" + invocation.getMethodName(), container.getInitFunc());
+            Number current = (Number) 
ConcurrentHashMapUtils.computeIfAbsent(container, 
invocation.getTargetServiceUniqueName() + "_" + invocation.getMethodName(), 
container.getInitFunc());
             container.getConsumerFunc().accept(responseTime, current);
         }
     }

Reply via email to