pkg/ddl, pkg/dxf: add local sort disk check and logging for backfill workers (#68320)#69099
pkg/ddl, pkg/dxf: add local sort disk check and logging for backfill workers (#68320)#69099expxiaoli wants to merge 37 commits into
Conversation
… treating as empty (pingcap#68065) (pingcap#68232) close pingcap#68064
…it codec-aware (pingcap#68263) (pingcap#68341) close pingcap#68262
|
@expxiaoli I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
Hi @expxiaoli. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
|
Important Review skippedToo many files! This PR contains 261 files, which is 111 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (261)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
[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 |
|
@expxiaoli: 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. |
This is a cherry-pick of #68320.
What problem does this PR solve?
Issue Number: ref #68293
Problem Summary:
When ADD INDEX runs with local sort on TiDB workers, the worker does not have an admission check for local disk headroom. A new backfill task may start even when the remaining disk is not enough for the ongoing local-sort workload plus the extra 10% headroom reserved for partial import.
Besides, there is no summary view of how much local disk space the backfill actually used, which makes disk pressure diagnosis harder.
What changed and how does it work?
This PR cherry-picks #68320 to improve both prevention and observability for local-sort ADD INDEX backfill.
The change:
Check List
Tests
Unit tests and checks:
GOPATH=/Users/xiaoli/go GOSUMDB=sum.golang.org ./tools/check/failpoint-go-test.sh pkg/ddl/ingest -run TestRiskOfDiskFull -count=1GOPATH=/Users/xiaoli/go GOSUMDB=sum.golang.org ./tools/check/failpoint-go-test.sh pkg/dxf/framework/taskexecutor -run TestSlotManager -count=1GOPATH=/Users/xiaoli/go GOSUMDB=sum.golang.org ./tools/check/failpoint-go-test.sh pkg/ddl -run '^$' -count=1GOPATH=/Users/xiaoli/go GOSUMDB=sum.golang.org make lintgit diff --check HEAD~2..HEADgit range-diff origin/pr/68320~2..origin/pr/68320 HEAD~2..HEADSide effects
Documentation
Release note