Repository navigation
dispatcher: avoid blocking resend workers on a full status buffer (#6743) - #6787
Conversation
Use one cancelable retry sender per block status buffer so a retry waits for admission without occupying a shared resend worker. Keep one pending entry per status and send it through the original ordered queue. Cover competing producers, duplicate WAITING reports, cancellation, shutdown, and ignored-status fast retry.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
/test all |
|
/test pull-cdc-mysql-integration-heavy-next-gen |
|
/test pull-cdc-kafka-integration-heavy-next-gen |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asddongmen, lidezhu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
10dfd9f
into
pingcap:release-nextgen-202609
This is an automated cherry-pick of #6743
What problem does this PR solve?
Issue Number: close #6719
A DB DDL barrier can ignore a moving dispatcher's WAITING report while it is still scheduling. Current master asks that dispatcher to retry, but a retry can block a shared thread-pool worker indefinitely when the block-status buffer is full. Cancellation cannot interrupt that blocked send, so other dispatchers' retries can be starved. This fixes the reproducible retry-path failure mode; the exact retry failure in the reported production incident remains unproven.
What is changed and how it works?
Check List
Tests
-race; targeted maintainer tests passed.dispatcheranddispatchermanagerpackage tests passed with two existing partial-flush tests skipped.TestRedoBatchDMLEventsPartialFlushtimes out at the same assertion on unmodified PR base.Questions
Will it cause performance regression or break compatibility?
No wire-protocol or compatibility change. Initial status delivery is unchanged. A full buffer starts one lazy sender goroutine per buffer and keeps at most one pending entry per active resend task.
Do you need to update user documentation, design documentation or monitoring documentation?
No. This is an internal retry-path fix.
Release note
Summary by CodeRabbit