ddl: load cloud storage before picking add-index backfill#69733
ddl: load cloud storage before picking add-index backfill#69733ti-chi-bot[bot] merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMoves cloud storage metadata loading ahead of backfill type selection in ChangesCloud storage precheck ordering fix
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
/cherry-pick release-nextgen-202603 |
|
@D3Hunter: once the present PR merges, I will cherry-pick it on top of release-nextgen-202603 in the new PR and assign it to you. DetailsIn response to this:
Instructions 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 ti-community-infra/tichi repository. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #69733 +/- ##
================================================
- Coverage 76.3235% 75.7447% -0.5789%
================================================
Files 2041 2079 +38
Lines 560482 585967 +25485
================================================
+ Hits 427780 443839 +16059
- Misses 131801 139299 +7498
- Partials 901 2829 +1928
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
🔍 Starting code review for this PR... |
ingress-bot
left a comment
There was a problem hiding this comment.
This review was generated by AI and should be verified by a human reviewer.
Manual follow-up is recommended before merge.
Summary
- Total findings: 3
- Inline comments: 1
- Summary-only findings (no inline anchor): 2
Findings (highest risk first)
🟡 [Minor] (3)
- Ordering dependency between loadCloudStorageURI and pickBackfillType is undocumented (pkg/ddl/index.go:1359, pkg/ddl/index.go:1822, pkg/ddl/index.go:1851)
- New 8-method fake DiskRoot duplicates the existing PreCheckUsage failpoint hook (pkg/ddl/backfilling_test.go:134, pkg/ddl/ingest/disk_root.go:158)
- New test double breaks the package's mock/fake naming convention (pkg/ddl/backfilling_test.go:134)
Unanchored findings
🟡 [Minor] (2)
- New 8-method fake DiskRoot duplicates the existing PreCheckUsage failpoint hook
- Request: Keep
ingest.LitDiskRootas the realdiskRootImpland enable the existingmockIngestCheckEnvFailedfailpoint for the subtest instead of introducing a new fake type that must track the fullDiskRootinterface.
- Request: Keep
- New test double breaks the package's mock/fake naming convention
- Request: Rename to something like
mockDiskRootWithFailedPreCheck(ormockFailingPreCheckDiskRoot) to keep the test-double naming convention consistent acrosspkg/ddl.
- Request: Rename to something like
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
@D3Hunter: new pull request created to branch DetailsIn response to this:
Instructions 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #69731
Problem Summary:
For distributed fast-reorg ADD INDEX with
tidb_cloud_storage_uriconfigured,initForReorgIndexespicked the backfill type beforeloadCloudStorageURIpopulatedjob.ReorgMeta.UseCloudStorage. As a result, the ingest path could run the local disk precheck even though global-sort cloud storage should bypass local disk usage checks.What changed and how does it work?
Load the cloud-storage URI before selecting the add-index backfill type during reorg initialization. This keeps
job.ReorgMeta.UseCloudStorageas the existing source of truth forpickBackfillType, so cloud-storage/global-sort jobs select ingest backfill without touching local disk precheck.A regression case was added to
TestPickBackfillTypewith a disk root that fails if local precheck is reached. The test verifies a distributed fast-reorg job with cloud storage configured setsUseCloudStorageand selectsReorgTypeIngest.Check List
Tests
Test commands:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit