Repository navigation
Conversation
The data GC safe point is inclusive and can delete a protected rollback exactly at startTS. Publish the predecessor of the oldest active start timestamp to PD, keeping the observable transaction start timestamp itself unchanged. This lets the coordinator reject histories already reclaimed without rejecting the oldest healthy reader. Signed-off-by: Ziqian Qin <eke@fastmail.com>
|
Skipping CI for Draft Pull Request. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the For example:
📖 For more info, you can check the "Contribute Code" section in the development guide. |
What problem does this PR solve?
Issue Number: ref #73623
Problem Summary:
In TiDB Classic, TiKV data GC treats the data GC safe point inclusively and can delete a protected primary rollback record written at
ts == dataSafePoint. Wheninfosyncpublishes the oldest active transaction's exactstartTSas the min-start-ts bound to etcd/PD, the data safe point can advance tostartTSwhile that transaction is still active. For shared-read transactions that must reject commits atstartTS <= dataSafePointto ensure lost-read rollback evidence has not been reclaimed (tikv/client-go#2184), publishingstartTSdirectly would either risk losing rollback evidence or falsely abort a healthy oldest reader.What changed and how does it work?
oldestStartTS - 1wheneveroldestStartTS > 0, placing the oldest active transaction's primary rollback strictly above the inclusive data GC safe point.startTSunchanged;0remains0, and NextGen preserves its existing behavior.Why this PR is isolated (Wave 1): It has no external dependency, is only +12/-1 production lines, and takes effect on all Classic clusters regardless of
tidb_enable_select_for_share. Keeping it standalone enables focused review and independent rollback. Planned for cherry-pick torelease-8.5(without thekerneltypeguard, as 8.5 is Classic-only).Check List
Tests
go test -count=1 ./pkg/domain/infosync/...with failpoints enabled, covering theoldestStartTS - 1published bound, zero handling, and unchanged observablestartTS)Side effects
Documentation
Release note