Saramanda9988 commented on PR #3837:
URL: https://github.com/apache/dubbo-go/pull/3837#issuecomment-7043130228

   > 感谢 @Saramanda9988 的实现。对照 #3835 看过一遍,没有重复冲突,后续 #3835 会直接复用这里的 
`rpcerror.Kind` 和 Dubbo 状态码映射,聚焦做跨信号抽离、`Observation` 解耦和链外失败补齐。
   > 
   > 合入前建议顺手确认两个小问题:
   > 
   > 1. **`ProxyInvoker` 会掩盖 
`context.DeadlineExceeded`**(`proxy/proxy_factory/default.go`):`retErr != nil` 
时直接调 `RecordKind(ctx, rpcerror.KindBusiness)`,会导致业务返回超时错误时被归成 `business` 而非 
`timeout`,建议先判断 `KindOf(err) == KindUnknown`(或排除 `context.DeadlineExceeded`)。
   > 2. **`RecordKind` / `RecordKindFor` 缺少 `o.pending != nil` 
判断**(`common/rpcerror/observation.go`):目前只判断了 `!o.frozen`,建议补上 `o.pending == 
nil`(与 `Observation.Record` 保持一致),避免异步快回调缓冲后晚到证据改写状态。
   
   @dodjdnh hi,谢谢你的cr,第一点我赞同并进行了修复,对于第二点,pending 似乎只会出现在已发出的异步 consumer 请求上,而 
RecordKind 只在 provider 侧调用并且 RecordKindFor 只在请求发出前调用,两者不会同时出现,所以这里可以先保持现状


-- 
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