dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

sentinel.TraceError和sentinel.Exit没有被调用

Open r27153733 opened this issue 11 months ago • 1 comments

Environment

  • Server: Dubbo-go, v3.1.1
  • Client: Dubbo-go, v3.1.1
  • Protocol: Triple

Issue description

context.WithValue 只能往子ctx存value,这导致OnResponse无法通过ctx.Value获取entry,导致entry没退出,sentinel.TraceError也不会被调用。

r27153733 avatar Mar 12 '24 15:03 r27153733

Can you provide more detailed descriptions like the concrete code location or code screenshot?

DMwangnima avatar Mar 13 '24 13:03 DMwangnima

您能否提供更详细的描述,例如具体代码位置或代码截图?

可以看到这两个方法的ctx是平行关系。 https://github.com/apache/dubbo-go/blob/2f5143a2acf4d420d2b93555a85021295bfe86f8/protocol/protocolwrapper/protocol_filter_wrapper.go#L126-L129 143行生成了新的子ctx。 https://github.com/apache/dubbo-go/blob/2f5143a2acf4d420d2b93555a85021295bfe86f8/filter/sentinel/filter.go#L120-L145 https://github.com/apache/dubbo-go/blob/2f5143a2acf4d420d2b93555a85021295bfe86f8/filter/sentinel/filter.go#L147-L150 https://github.com/apache/dubbo-go/blob/2f5143a2acf4d420d2b93555a85021295bfe86f8/filter/sentinel/filter.go#L91-L102

r27153733 avatar Mar 17 '24 03:03 r27153733