ddl: do not fill TiKV block cache for reorg coprocessor scans#69876
ddl: do not fill TiKV block cache for reorg coprocessor scans#69876sanketkedia wants to merge 1 commit into
Conversation
Reorg coprocessor scans (add index / add primary key backfill, and the table-max-handle probe) are single-pass bulk reads over the whole table/index range. The blocks they touch are never re-read by the reorg, so inserting them into the TiKV block cache yields no benefit while risking eviction of the working set that concurrent foreground traffic relies on. Set NotFillCache on the shared reorg DistSQLContext so all reorg coprocessor scans skip filling the block cache. The table-max-handle probe already set this flag directly; this makes the behavior consistent across every reorg coprocessor scan. Signed-off-by: Sanket Kedia <kediasanket11121993@gmail.com>
|
[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 |
|
Hi @sanketkedia. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: context deadline exceeded" 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 |
|
/ok-to-test |
|
@sanketkedia: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #69876 +/- ##
================================================
- Coverage 76.3207% 75.6140% -0.7067%
================================================
Files 2041 2084 +43
Lines 559975 582365 +22390
================================================
+ Hits 427377 440350 +12973
- Misses 131697 139884 +8187
- Partials 901 2131 +1230
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What problem does this PR solve?
Issue Number: close #69875
Problem Summary:
Reorg coprocessor scans are single-pass bulk reads over the whole table/index
range. They are sent with
NotFillCache = false, so every scanned block isinserted into the TiKV block cache. Those blocks are never re-read by the reorg,
so caching them brings no benefit while risking eviction of the working set that
concurrent foreground traffic relies on — regressing foreground read
latency during an online
ADD INDEXon a large table.What changed and how does it work?
Set
NotFillCache = trueon the shared reorgDistSQLContext(
newDefaultReorgDistSQLCtx). All reorg coprocessor scans are built from thiscontext (via
SetFromSessionVars), so they now skip filling the block cache.Check List
Tests
Side effects
Documentation
Release note