message center may block on shutdown when downstream receive channel is full
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 56
- Forks
- 63
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Description
What did you do?
In message center, the remote receive loop forwards decoded messages into the downstream receive channel. https://github.com/pingcap/ticdc/blob/8a067c41df29c525ec3dc3cadf4b38546c3190b8/pkg/messaging/remote_target.go#L658
Today this forwarding path can block indefinitely if:
- the downstream receive channel is full, and
- the stream is being closed during shutdown or reconnect
In that case, the receive goroutine may not exit promptly, which can lead to:
- stuck shutdown
- delayed reconnect cleanup
- goroutine leak risk
What did you expect to see?
No response
What did you see instead?
None
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(paste TiDB cluster version here)
Upstream TiKV version (execute tikv-server --version):
(paste TiKV version here)
TiCDC version (execute cdc version):
(paste TiCDC version here)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pkg/messaging/remote_target.go around line 658 and trace the remote receive loop's forwarding path, including the shutdown and reconnect signals. Reproduce or inspect the case where the downstream receive channel is full while the stream closes. Done means the receive goroutine exits promptly without leaving shutdown or reconnect cleanup blocked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100