dubbo-go
dubbo-go copied to clipboard
The client cannot obtain the attachment set by the server
Environment
- Server: Dubbo-go, v3.3.0
- Client: Dubbo-go, v3.3.0
- Protocol: Triple
- Registry: zookeeper
Issue description
Server:
result := invoker.Invoke(ctx, invocation) result.AddAttachment("code", zcode.CODE_SUCCESS) return result
Client:
result := invoker.Invoke(ctx, invocation) _, ok := result.Attachments()["code"]
The client cannot obtain the attachment. I didn't see response with attachment in the source code.
发现开发分支有一个提交和这个问题相关 #2854 ,但无法保证新老版本一致性,无法满足https://github.com/apache/dubbo-go-samples/tree/main/compatibility/filter/custom ,使用上也偏复杂。
已提交修改 #2927
Thanks!