Skip to content

resource control: support more mode for BURSTABLE #21138

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 6, 2025

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.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 6, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lhy1024, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello! I'm gemini-code-assist, here to provide a summary of this pull request. This PR primarily focuses on updating the documentation related to TiDB's resource control feature. Specifically, it introduces and documents the support for more granular modes for the BURSTABLE option within resource groups. The changes involve updating the syntax descriptions for CREATE RESOURCE GROUP and ALTER RESOURCE GROUP statements, as well as clarifying the behavior and available modes (OFF, MODERATED, UNLIMITED) for BURSTABLE in the documentation for the INFORMATION_SCHEMA.RESOURCE_GROUPS table. Several examples showing the output of querying INFORMATION_SCHEMA.RESOURCE_GROUPS are also updated to reflect the new BURSTABLE output format and include columns for QUERY_LIMIT and BACKGROUND.

Highlights

  • Documentation Updates: Documentation for CREATE RESOURCE GROUP, ALTER RESOURCE GROUP, and INFORMATION_SCHEMA.RESOURCE_GROUPS is modified to include the new BURSTABLE modes and their descriptions.
  • Example Updates: Examples showing the output of SELECT * FROM information_schema.resource_groups are updated to display the new BURSTABLE format (e.g., YES(UNLIMITED)) and include the QUERY_LIMIT and BACKGROUND columns.

Changelog

Click here to see the changelog
  • information-schema/information-schema-resource-groups.md
    • Updated example output for DESC resource_groups; to include QUERY_LIMIT and BACKGROUND columns and change RU_PER_SEC type display from bigint(21) to varchar(21) (lines 20-29).
    • Updated example output for SELECT * FROM information_schema.resource_groups; to include QUERY_LIMIT and BACKGROUND columns and show BURSTABLE as YES(UNLIMITED) for the default group (lines 40-44).
    • Updated example output for SELECT * FROM information_schema.resource_groups WHERE NAME = 'rg1'; to include QUERY_LIMIT and BACKGROUND columns (lines 73-77).
    • Updated the description of the BURSTABLE column to explain the OFF, MODERATED, and UNLIMITED modes and clarify the default mode for the default resource group (lines 86-90).
  • sql-statements/sql-statement-alter-resource-group.md
    • Updated the grammar definition for ALTER RESOURCE GROUP to explicitly list MODERATED, UNLIMITED, and OFF as valid options for BURSTABLE (lines 36-38).
    • Updated the description table for DirectResourceGroupOption to explain the three BURSTABLE modes and the default behavior (lines 89).
    • Updated example output for SELECT * FROM information_schema.resource_groups WHERE NAME ='default'; to show BURSTABLE as YES(UNLIMITED) (lines 173-177).
  • sql-statements/sql-statement-create-resource-group.md
    • Updated the grammar definition for CREATE RESOURCE GROUP to explicitly list MODERATED, UNLIMITED, and OFF as valid options for BURSTABLE (lines 36-38).
    • Updated the description table for DirectResourceGroupOption to explain the three BURSTABLE modes and the default behavior (lines 86).
    • Clarified the default BURSTABLE mode for the default resource group is UNLIMITED in the note section (line 92).
    • Added a new example for creating a resource group with BURSTABLE=UNLIMITED (lines 206-210).
    • Updated example output for SELECT * FROM information_schema.resource_groups WHERE NAME ='rg1' or NAME = 'rg2'; to show BURSTABLE as YES(MODERATED) for rg1 and NO for rg2 (lines 132-137).
  • sql-statements/sql-statement-drop-resource-group.md
    • Updated example output for SELECT * FROM information_schema.resource_groups WHERE NAME ='rg1'; to show BURSTABLE as YES(MODERATED) (lines 58-62).
  • tidb-resource-control-background-tasks.md
    • Updated example output for SELECT * FROM information_schema.resource_groups; to show BURSTABLE as YES(UNLIMITED) for the default group (lines 80-84).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation to reflect the new modes available for the BURSTABLE option in resource groups. The changes are mostly in table outputs and descriptions across several files. Overall, the updates clarify the new functionality. However, there are a few areas that need attention to ensure accuracy and consistency, primarily related to example outputs and a typo.

Summary of Findings

  • Documentation Accuracy: There's an incorrect row count in the DESC resource_groups; output in information-schema/information-schema-resource-groups.md.
  • Spelling Error: A typo "UNLIMTED" was found in sql-statements/sql-statement-create-resource-group.md. It should be "UNLIMITED".
  • Example Consistency: In tidb-resource-control-ru-groups.md, an example description refers to rg1 while the SQL code creates rg4.
  • Readability: The description of the BURSTABLE option is quite long in several files and could be broken down for better readability.
  • Formatting Consistency: EBNF diagrams in sql-statement-alter-resource-group.md and sql-statement-create-resource-group.md have inconsistent indentation for the new BURSTABLE options.

Merge Readiness

The pull request introduces important documentation updates for the BURSTABLE resource control option. While the changes are largely good, there are a few issues related to accuracy (incorrect command output, typo) and consistency (example naming) that should be addressed before merging. Addressing these will improve the clarity and correctness of the documentation. I am unable to approve pull requests, so please ensure these changes are reviewed and approved by a maintainer.

Copy link

ti-chi-bot bot commented Jun 6, 2025

@gemini-code-assist[bot]: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Code Review

This pull request updates the documentation to reflect the new modes available for the BURSTABLE option in resource groups. The changes are mostly in table outputs and descriptions across several files. Overall, the updates clarify the new functionality. However, there are a few areas that need attention to ensure accuracy and consistency, primarily related to example outputs and a typo.

Summary of Findings

  • Documentation Accuracy: There's an incorrect row count in the DESC resource_groups; output in information-schema/information-schema-resource-groups.md.
  • Spelling Error: A typo "UNLIMTED" was found in sql-statements/sql-statement-create-resource-group.md. It should be "UNLIMITED".
  • Example Consistency: In tidb-resource-control-ru-groups.md, an example description refers to rg1 while the SQL code creates rg4.
  • Readability: The description of the BURSTABLE option is quite long in several files and could be broken down for better readability.
  • Formatting Consistency: EBNF diagrams in sql-statement-alter-resource-group.md and sql-statement-create-resource-group.md have inconsistent indentation for the new BURSTABLE options.

Merge Readiness

The pull request introduces important documentation updates for the BURSTABLE resource control option. While the changes are largely good, there are a few issues related to accuracy (incorrect command output, typo) and consistency (example naming) that should be addressed before merging. Addressing these will improve the clarity and correctness of the documentation. I am unable to approve pull requests, so please ensure these changes are reviewed and approved by a maintainer.

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 kubernetes-sigs/prow repository.

@lilin90 lilin90 added the translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. label Jun 9, 2025
@lilin90 lilin90 self-assigned this Jun 9, 2025
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jun 9, 2025
@lilin90 lilin90 added missing-translation-status This PR does not have translation status info. v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2. labels Jun 9, 2025
@lilin90 lilin90 requested review from songrijie and lilin90 June 9, 2025 06:34
@lilin90 lilin90 added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed missing-translation-status This PR does not have translation status info. labels Jun 9, 2025
@hfxsd hfxsd self-requested a review June 12, 2025 03:40
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link

ti-chi-bot bot commented Jun 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lilin90. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

lilin90 and others added 2 commits June 16, 2025 17:07
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lhy1024 PTAL

Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 27, 2025
Copy link

ti-chi-bot bot commented Jun 27, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-27 03:00:45.405096267 +0000 UTC m=+1018298.128275246: ☑️ agreed by lilin90.

Copy link

ti-chi-bot bot commented Jun 27, 2025

@songrijie: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In 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 kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants