Repository navigation
Conversation
Count shared members for pagination and skip metadata-only locks when advancing resolved-ts. Resume after the attempted physical key so a page of live readers cannot hide a later expired data lock. Signed-off-by: Ziqian Qin <eke@fastmail.com>
|
Skipping CI for Draft Pull Request. |
|
[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 |
|
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. |
What problem does this PR solve?
Issue Number: close #6970
Related: pingcap/tidb#73623
When TiKV scans locks for checkpoint progress repair, shared-lock wrappers are expanded into individual holders that count toward
scanLockLimit. If a single key holds enough live shared readers to fill a page, TiCDC previously fed those lock-only shared holders to the resolver and stopped scanning the remainder of the region once a live holder returned a non-zero TTL—stranding later expired data locks and stalling checkpoint advancement.What is changed and how it works?
resolveScanLockInfosnow skipsOp_SharedLock,Op_Lock, andOp_PessimisticLockentries and passes only data locks to the resolver, since pure lock metadata cannot blockresolved-tsor checkpoint progress.nextScanLockKeycounts individual shared holders (max(1, len(info.GetSharedLockInfos()))) againstscanLockLimitand, when a page is full, advances the cursor tolastKey + 0x00so subsequent scans move past live shared-lock keys to reach later data locks in the same region.Planned for cherry-pick to
release-8.5.Check List
Tests
Verified with
go test -count=1 ./logservice/txnutil(covers skipping shared-lock pages and continuing past attempted data locks).Questions
Will it cause performance regression or break compatibility?
No compatibility impact (wire format and configuration are unchanged). Skipping lock-only metadata avoids unnecessary resolver RPCs for shared readers; regions with dense shared readers may issue extra
ScanLockpages to reach trailing data locks.Do you need to update user documentation, design documentation or monitoring documentation?
No. This is an internal fix to lock-resolution pagination during checkpoint progress repair.
Release note