apache / apache/rocketmq-client-go
response future done channel close late causes normal requests to report a timeout error
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 445
- PR merge metrics
- No merged PRs in 30d
Description
The issue tracker is **ONLY** used for the go client (feature request of RocketMQ need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as to the following:
**BUG REPORT**
1. Please describe the issue you observed:
When ctx time out, `r.ctx.Done()` returns, causing a normal response to return an error as well
https://github.com/apache/rocketmq-client-go/blob/7ae83c49351a96d78ebccec5dd545f0c05e3d514/internal/remote/remote_client.go#L233-L235
https://github.com/apache/rocketmq-client-go/blob/7ae83c49351a96d78ebccec5dd545f0c05e3d514/internal/remote/future.go#L60-L66
A simple way to reproduce this is to add `time.Sleep(time.Second*3)` before `if r.callback != nil`, then callback return get resp.Err, which is not nil
https://github.com/apache/rocketmq-client-go/blob/7ae83c49351a96d78ebccec5dd545f0c05e3d514/internal/remote/future.go#L47C5-L53
So response future should close channel before callback
Contributor guide
Assessment
This issue has not been assessed yet.