rpcinfo.GetRPCInfo获取的rpc_info非线程安全
- Dominant language
- Go
- Stars
- 8k
- Forks
- 918
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
代码底层使用了pool ,但是rpcinfo.GetRpcInfo()拿到了引用,如果在A方法异步去做。可能会被recycle拿到了空的属性,或者拿到B方法的属性(可能被此时的B方法从pool里取出并赋值)
这个feature有点坑啊。。。 如果非线程安全,那不要暴露出来。。或者COW
**To Reproduce**
Minimal code or configuration to reproduce the issue:
```go
// paste your code here
```
Steps:
1. ...
2. ...
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
What actually happened. Include error messages, logs, or panic stack traces if available.
```
// paste error output or logs here
```
**Environment:**
- Kitex version: (e.g. v0.12.1)
- Protocol: (Thrift / Protobuf / gRPC)
- Transport: (TTHeader / HTTP2 / Framed / ...)
output of go env
```
// paste the output of `go env` here
```
**Additional context**
Any other context such as IDL definitions, network topology, proxy/mesh setup, or service governance configuration (retry, circuit breaker, load balancer, etc.).
Contributor guide
Assessment
This issue has not been assessed yet.