-
Notifications
You must be signed in to change notification settings - Fork 0
test0315 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
|
/bot-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (13)
.github/workflows/code_review.yml (5)
3-12: Review Event Triggers and Commented CodeThe workflow correctly triggers on issue comments, but the previously configured pull request events are commented out. If they aren’t needed, consider removing them to keep the file clean; otherwise, add a note explaining why they remain.
18-22: Remove Trailing Spaces in Condition BlockStatic analysis flagged trailing spaces on these lines. Please remove any extraneous whitespace on lines 19–21 to conform to YAML formatting guidelines.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 19-19: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 21-21: trailing spaces
(trailing-spaces)
25-25: Update Checkout Action VersionThe static analysis notes that
actions/checkout@v3might be outdated. Consider updating to a newer version (for example, if available,actions/checkout@v4) to ensure compatibility and leverage potential improvements.🧰 Tools
🪛 actionlint (1.7.4)
25-25: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
32-32: Sanitize Untrusted InputThe inline script directly uses
${{ github.event.comment.body }}on line 32. Since this value comes from an untrusted source, consider sanitizing it or passing it as an environment variable to mitigate any injection risks. You can refer to the GitHub Actions security hardening guidelines for best practices.🧰 Tools
🪛 actionlint (1.7.4)
32-32: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
59-59: Remove Excess Blank LinesThere is an extra blank line at the end of the file (line 59) as noted by static analysis. Removing this will improve overall formatting.
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 59-59: too many blank lines
(1 > 0) (empty-lines)
faq/ddl-faq-test3.md (8)
6-8: Main Heading and Introduction Formatting
The main heading (“# DDL 常见问题”) and the introductory sentence on line 8 are informative. To improve readability and adhere to markdown style guidelines (MD022), consider ensuring that headings are surrounded by blank lines. For example, inserting a blank line before line 6 (if not already present) would help.
10-12: Section Heading on DDL 并行性
The heading “## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样的?” (line 10) clearly introduces the topic. To comply with markdownlint rules (MD022), add blank lines before and after this heading.
14-27: Numbered List on 并发 DDL Execution
The detailed numbered list from lines 14 to 27 effectively breaks down the execution rules. However, static analysis (MD007) indicates issues with unordered/nested list indentation. Please review and adjust the indentations of nested items (for example, the subpoints on lines 15–16 and 19–20) for consistency and to satisfy markdownlint requirements.
28-32: Priority Definition Section & Language Correction
The section starting with the heading “## TiDB DDL 的优先级如何定义?” (line 28) is well presented. Two improvements are suggested:
- Formatting: Insert blank lines above and below this heading per MD022.
- Language: On line 31, the phrase “对与 DDL …” appears to be a typographical error. Correct it to “对于 DDL …” for clarity.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
38-40: Fast Index Mode Section Heading
The heading “## 快速加索引方式的启动常见问题:” (line 38) is descriptive; however, note the following:
- Punctuation: The trailing colon “:” is flagged by MD026. Consider removing it for a cleaner heading.
- Spacing: Ensure this heading is surrounded by blank lines as required by MD022.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'(MD026, no-trailing-punctuation)
42-54: Fenced Code Block Formatting
The fenced SQL code block spanning lines 44 to 54 is clear and well-structured. To comply with markdownlint (MD031), ensure there are blank lines immediately before and after the code block.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
42-42: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
64-68: System Variable Settings Formatting
The section from lines 64 to 68 describing “TiDB 系统变量设置” is detailed and valuable. However, static analysis indicates unordered list indentation issues (MD007) in this part. Please adjust the bullet indentation to ensure a consistent and clean format.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
65-65: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
1-68: Overall Document Review
The new “DDL 常见问题” document offers a comprehensive overview of concurrent DDL behavior and related configuration in TiDB, providing clarity through detailed sections, lists, and examples. Addressing minor markdown formatting issues—such as adding blank lines around headings, correcting list indentations, and fixing the language typo ("对与" → "对于")—will further enhance readability and ensure compliance with established style guidelines.🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'(MD026, no-trailing-punctuation)
42-42: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
65-65: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/ci.yaml(0 hunks).github/workflows/code_review.yml(1 hunks).github/workflows/link-fail-fast.yaml(0 hunks).github/workflows/link.yaml(0 hunks).github/workflows/prevent-deletion.yaml(0 hunks)faq/ddl-faq-test3.md(1 hunks)
💤 Files with no reviewable changes (4)
- .github/workflows/ci.yaml
- .github/workflows/prevent-deletion.yaml
- .github/workflows/link-fail-fast.yaml
- .github/workflows/link.yaml
🧰 Additional context used
🪛 LanguageTool
faq/ddl-faq-test3.md
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...
(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
faq/ddl-faq-test3.md
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
42-42: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
65-65: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
🪛 actionlint (1.7.4)
.github/workflows/code_review.yml
25-25: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
32-32: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 YAMLlint (1.35.1)
.github/workflows/code_review.yml
[error] 19-19: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 21-21: trailing spaces
(trailing-spaces)
[warning] 59-59: too many blank lines
(1 > 0) (empty-lines)
🔇 Additional comments (5)
.github/workflows/code_review.yml (2)
29-44: Extraction Logic for Review ParametersThe regex-based extraction of commit SHAs and determining the review mode looks correct and handles both single commit and commit range scenarios appropriately. No changes are needed here.
🧰 Tools
🪛 actionlint (1.7.4)
32-32: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
45-59: AI Code Reviewer Step ConfigurationThe configuration for calling the AI Code Reviewer action—including the handling of secrets and parameters—is well-organized. Ensure that the referenced secrets (e.g.,
DEEPSEEK_API_KEY) are properly set in the repository settings.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 59-59: too many blank lines
(1 > 0) (empty-lines)
faq/ddl-faq-test3.md (3)
1-4: Front Matter & Metadata: Looks Good
The YAML front matter (lines 1–4) is clear and properly sets the title and summary for the document. No changes are necessary here.
55-55: Configuration Note Clarity
The 注意: note on line 55 is clear and effectively informs users about the configuration parameter requirements.
56-63: Cloud User Restrictions Table
The table that outlines restrictions and parameters for Cloud users (lines 56–63) is well formatted and informative. No issues detected here.
|
/bot-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/code_review.yml (3)
3-12: Event Triggers Configuration:
The workflow is configured to trigger on issue_comment events of type "created." There is also a commented-out section for pull_request events; if these are no longer needed, consider removing them to keep the file clean.
20-23: Checkout Action Version:
The checkout step is usingactions/checkout@v3. A static analysis hint suggests that this version may be outdated for current GitHub Actions requirements. Consider updating to a more recent version (for example,actions/[email protected]or the latest stable release) to take advantage of performance improvements and security fixes.🧰 Tools
🪛 actionlint (1.7.4)
21-21: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
25-40: Input Sanitization in Parameter Extraction:
Within the "Extract review parameters" step, the inline script directly references${{ github.event.comment.body }}. Since this data is untrusted, it is advisable to sanitize the input or pass it through an environment variable following GitHub’s security-hardening guidelines.🧰 Tools
🪛 actionlint (1.7.4)
28-28: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/code_review.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/code_review.yml
21-21: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
28-28: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🔇 Additional comments (4)
.github/workflows/code_review.yml (4)
1-2: Workflow Naming and Definition:
The workflow is clearly named "AI Code Review," which immediately conveys its purpose.
13-13: Permissions Configuration:
The workflow sets permissions to "write-all." Please verify that granting broad write permissions is essential for your use case; if not, consider restricting permissions to the minimum required for enhanced security.
15-19: Job Conditions and Environment Setup:
The 'review' job runs onubuntu-latestand includes a condition that restricts execution to issue_comment events whose body starts with "/bot-review." This well-defined condition ensures that the workflow only runs when intended.
41-55: AI Code Reviewer Action Configuration:
The step invoking theqiancai/ai-codereviewer@test-v2action is well-configured with the necessary tokens and API keys. Please ensure that the specified version ("test-v2") is stable and maintained over time. Otherwise, the integration looks solid.
|
/bot-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.github/workflows/code_review.yml (4)
3-12: Validate Trigger Configuration
The workflow is correctly set to trigger on new issue comments with the "created" type. If the previously commented-out pull request triggers are not needed, consider removing them to reduce clutter.
13-13: Assess Permissions Scope
The workflow usespermissions: write-all, which is quite broad. Verify if these elevated permissions are strictly necessary, or if more granular (least-privilege) permissions could be applied to enhance security.
20-23: Fix Typographical Error in Test Step
There's a minor typo in the echo statement ("test worflow"). Please correct it to "test workflow" for clarity.
23-27: Update Checkout Action Version
The "Checkout Repo" step usesactions/checkout@v3. A static analysis warning suggests that this version may be outdated. Consider updating to a newer version (e.g.,actions/checkout@v4if available) to leverage performance and security improvements.- uses: actions/checkout@v3 + uses: actions/checkout@v4🧰 Tools
🪛 actionlint (1.7.4)
24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/code_review.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/code_review.yml
24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
31-31: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🔇 Additional comments (3)
.github/workflows/code_review.yml (3)
1-2: Confirm Workflow Name
The workflow name "AI Code Review" is clear, concise, and appropriate for the intended purpose.
44-57: Review AI Code Reviewer Step Configuration
The AI Code Reviewer step is well-configured with the necessary tokens, model name, and review parameters. The fallback mechanism for outputs is handled appropriately.
15-19:✅ Verification successful
Security: Evaluate Use of Untrusted Input in Condition
The conditional expression on line 18 usesgithub.event.comment.bodydirectly. Since this value comes from an untrusted source, please review whether additional validation or sanitization is needed to avoid potential injection risks.
Security Review for Workflow Condition Input
After reviewing the workflow file at
.github/workflows/code_review.yml(lines 15-19), the usage ofgithub.event.comment.bodyin the condition appears to be standard for GitHub Actions workflows triggered by issue comments. This input is only used within thestartsWithfunction of the conditional expression, which is evaluated by the GitHub Actions engine in a controlled environment. Current evidence does not indicate a direct injection risk in this context.That said, it’s worthwhile to double-check that no other parts of the workflow inadvertently expose this untrusted input to unsafe operations. If this condition is the only place where
github.event.comment.bodyis used, then applying additional sanitization isn’t strictly necessary.
- Action Item: Verify that no subsequent steps misuse or further interpolate
github.event.comment.bodywithout proper validation.
|
/bot-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/workflows/code_review.yml (1)
30-45: 🛠️ Refactor suggestion
⚠️ Potential issueSanitize GitHub Event Input
In the "Extract review parameters" step, the assignment on line 34 directly uses the untrusted
${{ github.event.comment.body }}value without sanitization. This poses a security risk in line with previous feedback. To mitigate potential injection issues, consider filtering the input. For example:- COMMENT="${{ github.event.comment.body }}" + COMMENT=$(echo "${{ github.event.comment.body }}" | tr -cd '[:alnum:][:space:][:punct:]')This recommendation duplicates previous observations regarding input sanitization.
🧰 Tools
🪛 actionlint (1.7.4)
33-33: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🧹 Nitpick comments (2)
.github/workflows/code_review.yml (2)
5-5: Remove Trailing WhitespaceLine 5 appears to contain trailing whitespace. Please remove any extra spaces to comply with YAML lint guidelines.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 5-5: trailing spaces
(trailing-spaces)
60-61: Remove Extra Blank LinesThere are extra blank lines and/or trailing spaces at the end of the file (lines 60-61) as indicated by YAML lint. Please remove these to improve cleanliness and adhere to formatting standards.
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 60-60: too many blank lines
(1 > 0) (empty-lines)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/code_review.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/code_review.yml
16-16: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
26-26: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
33-33: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 YAMLlint (1.35.1)
.github/workflows/code_review.yml
[error] 5-5: trailing spaces
(trailing-spaces)
[error] 21-21: trailing spaces
(trailing-spaces)
[warning] 60-60: too many blank lines
(1 > 0) (empty-lines)
🔇 Additional comments (1)
.github/workflows/code_review.yml (1)
25-29: Update Checkout Action VersionThe workflow uses
actions/checkout@v3on line 26. Static analysis indicates that this version may be outdated. Please verify if a more recent minor version (for example,actions/[email protected]or later if available) is recommended by GitHub Actions and update accordingly.🧰 Tools
🪛 actionlint (1.7.4)
26-26: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
|
/bot-review: f7f3815 |
|
/bot-review |
|
|
||
| ## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样的? | ||
|
|
||
| 在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL) 执行的能力。 并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够清晰,建议明确说明并发 DDL 的具体版本支持范围。
| 在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL) 执行的能力。 并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: | |
| 在 TiDB v6.2 及之后的版本中,TiDB 提供了并发 DDL(concurrent DDL)执行的能力。并发 DDL 主要支持 DDL 语句间的并发执行。与之前的 DDL 执行相比,将发生以下变化: |
|
|
||
| 在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL) 执行的能力。 并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: | ||
|
|
||
| 1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够简洁,建议简化并明确相关性判断规则。
| 1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | |
| 1. 判断 DDL 语句间是否存在相关性。如果存在相关性,DDL 语句将按照进入 TiDB 的顺序执行;否则,可以并发执行。相关性判断规则如下: |
| 1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | ||
| 1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; | ||
| 2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; | ||
| 2. 是否所有的 DDL 语句都会并发执行? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够明确,建议补充说明哪些 DDL 语句不支持并发执行。
| 2. 是否所有的 DDL 语句都会并发执行? | |
| 2. 并非所有 DDL 语句都支持并发执行。TiDB 将 DDL 语句分为两类: |
| 当前我们仅对于需要重组的 DDL 语句启动了并发执行支持。 | ||
| 3. 对于启动了并发 DDL 语句支持的 TiDB 集群,DDL 语句间的并发度是如何确定的? | ||
| 目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 | ||
| 1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够清晰,建议明确说明并发度的计算方式。
| 1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); | |
| 2. 对于需要重组的 DDL(Reorg DDL)语句,并发度的设置规则如下(并发度不允许用户自定义):TiDB DDL owner 节点容器可用 CPU 资源数量的 1/4 与 1 之间的最大值。例如,8C 规格的 TiDB DDL owner 节点,并发度为 2。 |
| TiDB DDL owner 节点容器能够使用的 CPU 资源数量的 1/4 与 1 之间的最大值,例如 8C 规格的 TiDB DDL owner 节点,并发度将会是 2。 | ||
|
|
||
| ## TiDB DDL 的优先级如何定义? | ||
| 由于 DDL 语句,特别是需要重组的 DDL 语句在执行的过程中可能会占用较多计算或者存储引擎资源,从而导致对于前端用户业务的影响。通过对 DDL 任务设置 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够简洁,建议简化并明确优先级设置的目的。
| 由于 DDL 语句,特别是需要重组的 DDL 语句在执行的过程中可能会占用较多计算或者存储引擎资源,从而导致对于前端用户业务的影响。通过对 DDL 任务设置 | |
| 由于 DDL 语句,特别是需要重组的 DDL 语句,可能会占用较多计算或存储引擎资源,从而影响前端用户业务。通过设置 DDL 任务的优先级,可以在业务高峰期间降低 DDL 对集群资源的争抢。 |
| - [`tidb_ddl_reorg_batch_size`](/system-variables.md#tidb_ddl_reorg_batch_size) | ||
|
|
||
| ## 快速加索引方式的启动常见问题: | ||
| 从 TiDB v6.3 开始,我们为 TiDB 用户提供了 快速加索引的模式,可以相对于 v6.1 提升 10倍的速度。我们在 TiDB v6.5 快速加索引模式已经 GA。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够清晰,建议明确说明快速加索引模式的具体版本支持范围。
| 从 TiDB v6.3 开始,我们为 TiDB 用户提供了 快速加索引的模式,可以相对于 v6.1 提升 10倍的速度。我们在 TiDB v6.5 快速加索引模式已经 GA。 | |
| 从 TiDB v6.3 开始,TiDB 提供了快速加索引模式,相较于 v6.1,速度提升了 10 倍。在 TiDB v6.5 中,快速加索引模式已正式发布(GA)。 |
|
|
||
| ## 快速加索引方式的启动常见问题: | ||
| 从 TiDB v6.3 开始,我们为 TiDB 用户提供了 快速加索引的模式,可以相对于 v6.1 提升 10倍的速度。我们在 TiDB v6.5 快速加索引模式已经 GA。 | ||
| 这里说明一下从低版本升级上来,的一些检查事项: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够简洁,建议简化并明确检查事项的目的。
| 这里说明一下从低版本升级上来,的一些检查事项: | |
| 以下是从低版本升级时需要检查的事项: |
| 3 rows in set (0.52 sec) | ||
| ``` | ||
| **注意:** 这个是一个配置参数,需要重启 TiDB 节点,上面 `Value` 字段查询出来值应该和用户设置的值应该一致。 | ||
| - 对于 Cloud 用户,我们对于能够使用快速加索引功能的使用有一些限制: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够清晰,建议明确说明 Cloud 用户使用快速加索引功能的限制条件。
| - 对于 Cloud 用户,我们对于能够使用快速加索引功能的使用有一些限制: | |
| 对于 Cloud 用户,使用快速加索引功能有以下限制: |
|
✅ Code review completed, generated 8 comments. |
|
/bot-review: 6519f33 |
|
✅ Code review completed, generated 2 comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (11)
faq/ddl-faq-test3.md (11)
1-4: Front Matter and Metadata Formatting ImprovementsThe YAML front matter is correct overall. However, to comply with markdown style guidelines (MD022), please add a blank line after the closing
---on line 4 to clearly separate the metadata from the body content.
6-8: Main Heading FormattingThe main heading “DDL 常见问题” is clear. For improved readability and to comply with markdownlint MD022, consider adding blank lines before and after the heading.
10-11: Header Clarity and ConcisenessThe header “TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样地?” is descriptive but a bit lengthy. Consider simplifying it—e.g., “TiDB DDL: 并行执行支持及运行特征”—to improve clarity and conciseness.
12-13: Introduction to Concurrent DDLThe description clearly states that TiDB provides concurrent DDL execution starting from v6.2. For further clarity, you might specify that “v6.2 之后” means “from v6.2 onward” and briefly mention the scope of this capability.
22-27: Concurrency Level Determination ExplanationThe explanation on how the concurrency level is determined is informative. To enhance clarity, it may help to rephrase the rule “CPU 资源数量的 1/4 与 1 之间的最大值” into a more precise statement. For example, you could state that the concurrency is the maximum value between 1 and one-quarter of the available CPU cores.
38-40: Introduction to Fast Index Creation SectionThe introduction to the fast index mode is generally clear. To adhere to markdown style guidelines, add a blank line after the header (MD022). Additionally, consider rephrasing “提供了 快速加索引的模式” to ensure consistency (e.g., “提供了快速加索引模式”) and adjust “提升 10倍的速度” to “速度提升 10倍” for better clarity.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'(MD026, no-trailing-punctuation)
41-43: Configuration Parameters for Fast Index ModeThe explanation of the
temp-dirconfiguration is helpful. For improved readability, ensure that:
- The heading “TiDB 配置参数” is separated by blank lines.
- The description is punctuated consistently (e.g., consider ending sentences with a full stop).
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
42-42: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
44-54: SQL Code Block FormattingThe fenced SQL code block is formatted correctly and illustrates the query output well. To comply with MD031 (fenced code blocks should be surrounded by blank lines), please ensure there’s a blank line before and after the code block.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
44-44: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
55-56: Important Notice and Transition to Cloud User LimitationsThe “注意:” note is clear. For consistency and readability, ensure there is proper punctuation and spacing. Also, consider verifying that the transition to the next section (Cloud 用户的限制) is smooth by adding a blank line.
57-63: Cloud User Fast Index Mode Table FormattingThe table provides useful information about cloud support for fast index mode. A couple of points to address:
- Verify that the escape sequence
\>=in line 61 is rendered correctly. If not necessary, remove the backslash.- Ensure that the table formatting meets markdown table guidelines for clarity.
64-68: TiDB System Variables for Fast Index ModeThe list of system variables is clear and informative. For improved markdown readability:
- Add blank lines before and after the list.
- Check for consistent punctuation at the end of each description.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
65-65: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
faq/ddl-faq-test3.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
faq/ddl-faq-test3.md
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...
(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
faq/ddl-faq-test3.md
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
42-42: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
65-65: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
🔇 Additional comments (4)
faq/ddl-faq-test3.md (4)
14-16: Clarify DDL Dependency RulesThe bullet list explains that DDL statements with dependencies execute sequentially while unrelated ones can run concurrently. To improve readability, consider rephrasing and restructuring the points to explicitly state the conditions under which statements are considered related.
For example:
-1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: - 1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; - 2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; +1. 判断 DDL 语句间是否存在相关性: + - 如果在同一张表上的 DDL 语句存在相关性,则按提交顺序依次执行。 + - 对于 Schema 操作(例如 Drop Schema),若涉及到同一 Schema 内多个表的操作,同样必须按照顺序执行。
17-18: Detail on Concurrent Execution EligibilityThe section poses a good clarifying question on whether all DDL statements run concurrently and then explains that they are divided into two types. It could be beneficial to briefly mention which specific DDL statements are inherently sequential (e.g., general DDL) to set reader expectations.
19-21: Detailing DDL CategoriesThe categorization into “普通(general)DDL” and “需要重组(reorg)DDL” is comprehensive. It is clear that concurrent execution is enabled only for the latter. Consider adding a note if there’s any plan to extend concurrency support to general DDL in the future.
28-36: DDL Priority Definition and FormattingThe section on DDL priority is useful but could benefit from some simplification. In particular:
- The sentence in line 29 is long; consider breaking it into shorter sentences.
- There is a typographical issue with “对与 DDL” on line 31—this should be corrected to “对于 DDL.”
A revised diff might look like:
- 由于 DDL 语句,特别是需要重组的 DDL 语句在执行的过程中可能会占用较多计算或者存储引擎资源,从而导致对于前端用户业务的影响。通过对 DDL 任务设置 - - [`tidb_ddl_reorg_priority`](/system-variables.md#tidb_ddl_reorg_priority) - 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会通过优先级降低 DDL 对于集群资源的争抢. + 由于某些 DDL(特别是需要重组的 DDL)在执行时可能占用较多资源,从而影响前端业务,我们允许在业务高峰期间调整 DDL 任务的优先级。 + - 使用 [`tidb_ddl_reorg_priority`](/system-variables.md#tidb_ddl_reorg_priority) 可降低 DDL 任务优先级。 + - 其他相关参数请参考下面的设置:🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
|
/bot-review: 2500028 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (9)
faq/ddl-faq-test3.md (9)
1-4: Front Matter Formatting:
The YAML front matter is correctly structured. Consider adding an extra blank line after the closing---on line 4 to clearly separate the metadata from the content and improve readability.
14-16: Improve List Formatting:
The numbered list starting on line 14 would benefit from consistent indentation and separation by blank lines, as recommended by markdownlint. This will enhance readability.
17-21: Ensure Consistent Sub-list Indentation:
For the section starting on line 17 (“是否所有的 DDL 语句都会并发执行?”), ensure that the sub-lists are uniformly indented and that there are blank lines surrounding the list. This adherence to markdown best practices will improve the document’s structure.
22-26: Clarify DDL Concurrency Details:
The explanation for determining DDL concurrency (lines 22–26) is clear. Consider adding an extra blank line after the list to visually separate this section from the following content.
28-36: Refine DDL Priority Section:
- Add a blank line immediately after the heading on line 28 to conform with markdown conventions.
- On line 31, update “对与 DDL 等任务” to “对于 DDL 等任务” to correct the typo.
- Also, review the indentation of the bullet list (lines 30–36) and ensure it is consistently formatted and surrounded by blank lines for clarity.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
38-40: Revise Fast Index Creation Heading:
Remove the trailing colon (“:”) from the heading on line 38—e.g., change it to “## 快速加索引方式的启动常见问题”—and add a blank line after the heading to improve readability.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'(MD026, no-trailing-punctuation)
41-44: Enhance Configuration Parameter Formatting:
- The nested bullet on line 43 would be clearer with improved formatting.
- Ensure that the fenced code block initiated on line 44 is preceded and followed by a blank line, as recommended by markdownlint (MD031).
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
42-42: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
55-55: Consider Formatting the Note:
The “注意” note on line 55 is important information. For better prominence and readability, consider formatting it as a blockquote (using>) rather than inline text.
64-67: Refine System Variables Section Formatting:
Ensure that the list items in the system variables section (lines 65–67) have consistent indentation and are surrounded by blank lines, in line with markdownlint guidelines, to improve the document’s overall formatting.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
65-65: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3(MD007, ul-indent)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
faq/ddl-faq-test3.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
faq/ddl-faq-test3.md
[uncategorized] ~31-~31: 您的意思是“对"于"”吗?
Context: ...riables.md#tidb_ddl_reorg_priority) 对与 DDL 等任务如果用户在业务高峰期间,可以将优先级调低,这样 TiDB 集群会...
(YU7_YU8)
🪛 markdownlint-cli2 (0.17.2)
faq/ddl-faq-test3.md
28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
30-30: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
30-30: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
32-32: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
34-34: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
35-35: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
38-38: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
38-38: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
42-42: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
42-42: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
43-43: Unordered list indentation
Expected: 4; Actual: 5
(MD007, ul-indent)
43-43: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
44-44: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
65-65: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
65-65: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
67-67: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
🔇 Additional comments (4)
faq/ddl-faq-test3.md (4)
6-8: Correct Language in Introduction:
The introduction on line 8 contains a typo: “常见的些” should be corrected to “常见的” for clarity.
10-10: Refine Heading Wording:
Update the heading on line 10 to “## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样的?” to fix the grammatical error (“怎样地” → “怎样的”).
44-55: Ensure Proper Fenced Code Block Closure:
Verify that the SQL code block started on line 44 is properly closed with a matching triple backtick (```). Additionally, insert a blank line after the closing fence to separate it from the subsequent text.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
44-44: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
54-54: Fenced code blocks should be surrounded by blank lines
null(MD031, blanks-around-fences)
58-63: Correct Table Header:
The table header on line 58 displays “是否支持快速索引模” but appears to be missing the trailing “式”. Please update it to “是否支持快速索引模式” for clarity and accuracy.
|
✅ Code review completed, 1 comments generated. |
|
|
||
| | 描述 | 供应商 | TiDB CPU 规格 | 是否支持快速索引模 | 备注 | | ||
| |-----------------------|-----|------------------|------------|------| | ||
| | TiDB cloud Dedicated | AWS | 2C vCPU, 4C vCPU | 不支持 | 成本问 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
备注中的描述不完整,"成本问" 应改为 "成本问题" 以保持一致性。
| | TiDB cloud Dedicated | AWS | 2C vCPU, 4C vCPU | 不支持 | 成本问 | | |
| | TiDB cloud Dedicated | AWS | 2C vCPU, 4C vCPU | 不支持 | 成本问题 | |
|
✅ Code review completed, 2 comments generated. |
|
/bot-review |
|
✅ Code review completed, no issues found. |
|
/bot-review: c24f569 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
ticdc/ticdc-faq.md (2)
444-445: Accurate Error Cause Explanation:
The explanation details how TiDB converts aDELETE + INSERTinto anUPDATEand how this can lead to unique key conflicts. For enhanced readability, consider a slight language polish if the target audience is not deeply technical.
467-469: Markdown Formatting Improvement:
The fenced code block for the sink-uri configuration would benefit from having blank lines immediately before and after it to comply with markdownlint’s MD031 rule. Consider inserting an empty line above the openingand another after the closingfor better readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
ticdc/ticdc-faq.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
ticdc/ticdc-faq.md
482-482: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
🔇 Additional comments (7)
ticdc/ticdc-faq.md (7)
441-441: Clear Section Title:
The new FAQ section title clearly indicates the problematic error scenario.
442-443: Concise Error Introduction:
The opening lines effectively introduce the error (CDC:ErrMySQLDuplicateEntryCDC) and set the context for the discussion.
446-452: Clear SQL Example for Table Definition:
The provided SQL snippet that creates the example table is clear, correctly formatted, and gives a good context for the error scenario.
453-459: Effective DML Example:
The SQL example demonstrating the deletion and insertion operations is effective in illustrating the scenario where the error may occur.
460-464: Illustrative Transformation Explanation:
The code block showing how TiCDC transforms the operations into twoUPDATEstatements is very illustrative and helps in understanding the underlying issue.
465-466: Clear Conflict Outcome Description:
The narrative that explains how the secondUPDATEmay violate unique key constraints is clear and concise.
470-470: Conclusive Explanation:
The final statement neatly summarizes the effect of enabling safe mode, ensuring the solution is clearly communicated.
|
✅ Code review completed, 4 comments generated. |
|
|
||
| ## 当频繁出现 `CDC:ErrMySQLDuplicateEntryCDC` 错误时,如何解决? | ||
|
|
||
| 使用 TiCDC 将数据同步到 TiDB 或 MySQL 时,如果上游以特定模式执行 SQL ,可能会遇到如下错误: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够清晰,建议明确说明上游执行 SQL 的具体模式,以便用户更好地理解问题。
| 使用 TiCDC 将数据同步到 TiDB 或 MySQL 时,如果上游以特定模式执行 SQL ,可能会遇到如下错误: | |
| 使用 TiCDC 将数据同步到 TiDB 或 MySQL 时,如果上游事务以特定模式(如在同一事务内对同一行执行 `DELETE + INSERT` 操作)执行 SQL,可能会遇到如下错误: |
|
|
||
| `CDC:ErrMySQLDuplicateEntryCDC` | ||
|
|
||
| 出现该错误的原因:TiDB 会将同一事务内对同一行的 `DELETE + INSERT` 操作提交为一个 `UPDATE` 行变更,当 TiCDC 以 UPDATE 的形式向下游同步数据时,尝试交换唯一键值的 `UPDATE` 操作可能会出现冲突。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句逻辑不够清晰,建议明确说明 TiCDC 如何处理 UPDATE 操作以及为何会导致冲突。
| 出现该错误的原因:TiDB 会将同一事务内对同一行的 `DELETE + INSERT` 操作提交为一个 `UPDATE` 行变更,当 TiCDC 以 UPDATE 的形式向下游同步数据时,尝试交换唯一键值的 `UPDATE` 操作可能会出现冲突。 | |
| 出现该错误的原因:TiDB 会将同一事务内对同一行的 `DELETE + INSERT` 操作提交为一个 `UPDATE` 行变更。当 TiCDC 以 `UPDATE` 的形式向下游同步数据时,如果 `UPDATE` 操作尝试交换唯一键值,可能会导致唯一键冲突。 |
| UPDATE data_table SET value = 'v1' WHERE id = 2; | ||
| ``` | ||
|
|
||
| 在执行第二条 `UPDATE` 语句时,如果下游的表中仍然存在 `v1`,会破坏 `value` 列的唯一键约束,从而导致 `CDC:ErrMySQLDuplicateEntryCDC` 错误。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句描述不够准确,建议明确说明 v1 在下游表中存在的原因。
| 在执行第二条 `UPDATE` 语句时,如果下游的表中仍然存在 `v1`,会破坏 `value` 列的唯一键约束,从而导致 `CDC:ErrMySQLDuplicateEntryCDC` 错误。 | |
| 在执行第二条 `UPDATE` 语句时,如果下游的表中仍然存在 `v1`(由于第一条 `UPDATE` 尚未提交或延迟),会破坏 `value` 列的唯一键约束,从而导致 `CDC:ErrMySQLDuplicateEntryCDC` 错误。 |
|
|
||
| 在执行第二条 `UPDATE` 语句时,如果下游的表中仍然存在 `v1`,会破坏 `value` 列的唯一键约束,从而导致 `CDC:ErrMySQLDuplicateEntryCDC` 错误。 | ||
|
|
||
| 如果你频繁遇到 `CDC:ErrMySQLDuplicateEntryCDC` 错误,可以在 `sink-uri` 配置中设置 `safe-mode=true` 参数启用 TiCDC 安全模式: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句建议补充说明启用安全模式的具体影响,以便用户权衡利弊。
| 如果你频繁遇到 `CDC:ErrMySQLDuplicateEntryCDC` 错误,可以在 `sink-uri` 配置中设置 `safe-mode=true` 参数启用 TiCDC 安全模式: | |
| 如果你频繁遇到 `CDC:ErrMySQLDuplicateEntryCDC` 错误,可以在 `sink-uri` 配置中设置 `safe-mode=true` 参数启用 TiCDC 安全模式。启用安全模式后,TiCDC 会将 `UPDATE` 操作拆分为 `DELETE + INSERT` 进行执行,从而避免唯一键冲突错误,但可能会增加同步延迟。 |
|
/bot-review: 6519f33 |
|
|
||
| # DDL 常见问题 | ||
|
|
||
| 本文档介绍 TiDB 中常见的些 DDL 问题。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句存在语法错误,"常见的些" 应改为 "常见的"。
| 本文档介绍 TiDB 中常见的些 DDL 问题。 | |
| 本文档介绍 TiDB 中常见的 DDL 问题。 |
|
|
||
| 本文档介绍 TiDB 中常见的些 DDL 问题。 | ||
|
|
||
| ## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样地? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该句存在语法错误,"怎样地" 应改为 "怎样的"。
| ## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样地? | |
| ## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样的? |
|
✅ Code review completed, 2 comments generated. |
First-time contributors' checklist
What is changed, added or deleted? (Required)
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 (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?
Summary by CodeRabbit
Documentation
CDC:ErrMySQLDuplicateEntryCDCerror, providing guidance on enabling safe mode to avoid unique key constraint violations.Chores