Conversation
|
[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 |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe documentation adds asynchronous preparation details for TiDB Cloud imports. It documents the ChangesImport preparation documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: 🟡 Moderate · up to The import documentation incorrectly describes Global Sort as universal for plans where it is unavailable. Correct the opening statement before merging to avoid misleading import configuration decisions. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: pingcap/docs/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: e5df805e-0ab4-4b3f-af35-471b5992f9ba
📒 Files selected for processing (2)
sql-statements/sql-statement-import-into.mdsql-statements/sql-statement-show-import-job.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
|
|
||
| <CustomContent platform="tidb-cloud" plan="starter,essential,premium"> | ||
|
|
||
| On TiDB X instances, `IMPORT INTO ... FROM FILE` uses [Global Sort](#global-sort). TiDB creates the import job first and then prepares it asynchronously in the background. The preparation work includes: |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '180,270p' sql-statements/sql-statement-import-into.md
rg -n -i 'global sort|starter|essential|premium' sql-statements/sql-statement-import-into.mdRepository: pingcap/docs
Length of output: 14540
Scope the Global Sort statement to asynchronous-preparation instances.
The section applies to Starter, Essential, and Premium instances. Global Sort is unavailable on Starter and Essential, and Starter uses synchronous preparation. Replace the incorrect universal Global Sort claim with asynchronous-preparation wording.
Suggested wording
-On TiDB X instances, `IMPORT INTO ... FROM FILE` uses [Global Sort](`#global-sort`). TiDB creates the import job first and then prepares it asynchronously in the background. The preparation work includes:
+On TiDB X instances that use asynchronous preparation, `IMPORT INTO ... FROM FILE` creates the import job first and then prepares it asynchronously in the background. The preparation work includes:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| On TiDB X instances, `IMPORT INTO ... FROM FILE` uses [Global Sort](#global-sort). TiDB creates the import job first and then prepares it asynchronously in the background. The preparation work includes: | |
| On TiDB X instances that use asynchronous preparation, `IMPORT INTO ... FROM FILE` creates the import job first and then prepares it asynchronously in the background. The preparation work includes: |
What is changed, added, or deleted? (Required)
Document the asynchronous preparation flow that
IMPORT INTO ... FROM FILEuses on TiDB X (NextGen) deployments, and correct the job phase list and theSource_File_Sizedescription ofSHOW IMPORT JOB(s).On TiDB X, an
IMPORT INTO ... FROM FILEjob is created first and then prepared in the background: TiDB lists the source files that matchfileLocation, detects the file format when theFORMATclause is omitted, calculates resource-related parameters such as the import concurrency, and splits the source files into chunks for parallel processing. Until the preparation succeeds, the job is in thepreparingphase andSource_File_SizeisN/A. For a large single-table import, such as an import of tens of TiB, thepreparingphase can take a noticeable amount of time even when the statement is executed with theDETACHEDoption, and no data is imported during this period. To avoid misoperations during this period, the new note tells users to check the job phase before taking any action on the job, such as canceling it. Starter instances prepare import jobs synchronously, so the new section states that thepreparingphase is not shown for them.The new section is wrapped in
<CustomContent platform="tidb-cloud" plan="starter,essential,premium">, because the asynchronous preparation flow exists only in the NextGen kernel, which TiDB X instances run.Changed files:
sql-statements/sql-statement-import-into.md: add a### Asynchronous preparationsection between### Global Sortand### Output.sql-statements/sql-statement-show-import-job.md: correct thePhaselist topreparing,global-sorting,importing,resolving-conflicts, andvalidating(add-indexis not anIMPORT INTOjob phase), and document theN/Avalue ofSource_File_Size.Validation on the changed files:
./scripts/markdownlint sql-statements/sql-statement-import-into.md sql-statements/sql-statement-show-import-job.mdpython3 scripts/check-tags.py sql-statements/sql-statement-import-into.md sql-statements/sql-statement-show-import-job.mdpython3 scripts/check-manual-line-breaks.py sql-statements/sql-statement-import-into.md sql-statements/sql-statement-show-import-job.md./node_modules/.bin/remark -u lint -u @breeswish-org/remark-lint-pingcap-docs-anchor sql-statements/sql-statement-import-into.md sql-statements/sql-statement-show-import-job.md --frail --quiet./node_modules/.bin/markdown-link-check --config <generated from scripts/markdown-link-check.tpl> <changed files>Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
IMPORT INTO ... FROM FILEon TiDB Cloud platforms.preparing, and how to monitor progress withSHOW IMPORT JOB(S).N/Awhile preparation is in progress.