manzhizhen opened a new issue, #3012:
URL: https://github.com/apache/dubbo-go/issues/3012

   ### ✅ 验证清单
   
   - [x] 🔍 我已经搜索过 [现有 
Issues](https://github.com/apache/dubbo-go/issues),确信这不是重复问题
   
   ### 🚀 Go 版本
   
   1.23.0
   
   ### 📦 Dubbo-go 版本
   
   v3.3.0
   
   ### 🖥️ 服务端配置
   
   _No response_
   
   ### 💻 客户端配置
   
   _No response_
   
   ### 🌐 协议配置
   
   _No response_
   
   ### 📋 注册中心配置
   
   _No response_
   
   ### 💾 操作系统
   
   🪟 Windows
   
   ### 📝 Bug 描述
   
   Fixed an issue where the counter was not decremented when an error occurred 
in the OnResponse dubboInvokeStartTime conversion (although the current code 
does not seem to cause an error).   show code:
   `
   // OnResponse update the active count base on the request result.
   func (f *activeFilter) OnResponse(ctx context.Context, result result.Result, 
invoker base.Invoker, inv base.Invocation) result.Result {
        startTime, err := 
strconv.ParseInt(inv.(*invocation.RPCInvocation).GetAttachmentWithDefaultValue(dubboInvokeStartTime,
 "0"), 10, 64)
        if err != nil {
                result.SetError(err)
                logger.Errorf("parse dubbo_invoke_start_time to int64 failed")
                    // warn: base.EndCount not invoke
                return result
        }
        elapsed := base.CurrentTimeMillis() - startTime
        base.EndCount(invoker.GetURL(), inv.MethodName(), elapsed, 
result.Error() == nil)
        return result
   }
   
   `
   
   ### 🔄 重现步骤
   
   This issue is theoretical and will not occur in practice, but it can lead to 
code inaccuracies.
   
   ### ✅ 预期行为
   
   when has err,the counter can decremented
   
   ### ❌ 实际行为
   
   This issue is theoretical and will not occur in practice, but it can lead to 
code inaccuracies.
   
   ### 💡 可能的解决方案
   
   I have a PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to