Invalidate read-index cache when lock is found (#11016) - #11023
Invalidate read-index cache when lock is found (#11016)#11023ti-chi-bot wants to merge 7 commits into
Conversation
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
|
[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 Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This is an automated cherry-pick of #11016
What problem does this PR solve?
Issue Number: close #10985
Problem Summary:
When TiFlash local learner read meets a lock, the read-index result for that region may still be cached. Later retries can reuse the old read-index result even though the lock needs a newer apply progress to be resolved, which can cause unnecessary remote reads or repeated lock handling.
What is changed and how it works?
This PR invalidates the read-index cache when a local lock is found, so later retries need to obtain a fresh read-index result for that region.
It also prints the first lock's detailed info in
LockException, making it easier to identify the blocking lock from TiFlash logs without dumping every lock.Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Tests