Skip to content

Conversation

qiancai
Copy link
Owner

@qiancai qiancai commented Sep 29, 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 (in Chinese).

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 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

Summary by CodeRabbit

  • Documentation
    • Added documentation for a new system variable that controls the optimizer’s default selectivity when statistics are insufficient (introduced in v9.0.0).
    • Describes scopes (SESSION and GLOBAL), cluster persistence, and control via query hint.
    • Specifies valid range [0, 1] with a default of 0.8.
    • Includes guidance noting it’s generally not recommended to modify this value.

Copy link

Summary of Changes

Hello @qiancai, 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!

This pull request, titled "Update system-variables.md", appears to be an attempt to introduce documentation for new system variables related to optimizer selectivity and executor concurrency in TiDB, as suggested by the PR description and an automated summary. However, the only change reflected in the provided patch is the addition of a temporary markdown file named "temp.md" containing a simple test string. This suggests a potential mismatch between the stated intent and the actual file changes presented for review.

Highlights

  • Temporary File Addition: A new file named "temp.md" has been added to the repository, containing the text "This is a test file.".
  • Intended Documentation Updates (Not in Patch): The pull request description and an automated summary indicate an intention to update "system-variables.md" to document new "tidb_opt_selectivity_factor" and per-operator executor concurrency controls. However, these specific documentation changes are not present in the provided patch.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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 adds a new file temp.md. However, the title and description indicate that the goal was to update system-variables.md. The added file seems unrelated to the stated purpose of the PR and might have been included by mistake. My review is based on the file change provided.

Copy link

🤖 Auto-sync completed successfully

📥 Source PR: qiancai/docs-cn#15
🎯 Target PR: #49
✅ English documentation has been updated based on Chinese documentation changes.

This comment was generated automatically by the sync workflow.

  Synced from: qiancai/docs-cn#15
  Target PR: #49
  AI Provider: gemini

  Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

Documentation update adds a new system variable entry for tidb_opt_selectivity_factor to system-variables.md, detailing scope, persistence, type, range, default, control via SET_VAR hint, purpose, and a note discouraging modification.

Changes

Cohort / File(s) Summary
Docs: System Variables
system-variables.md
Added documentation for new variable tidb_opt_selectivity_factor (v9.0.0): SESSION/GLOBAL scope, persisted to cluster, controllable via query hint SET_VAR; float [0,1], default 0.8; used when statistics cannot derive predicate selectivity; note advising against modification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers, read the lore,
A factor new—selectivity’s core!
From zero to one, set just right,
It guides the planner through the night.
I hop, I nod: docs aligned—
0.8 by default, optimization in mind.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description includes the contribution template but leaves all required sections blank, including the summary of changes and the affected version checklist, and the CLA checkbox is not marked, making it incomplete. Please complete the PR description by filling in the “What is changed, added or deleted?” section with a clear summary, selecting the affected TiDB version(s), and checking the CLA confirmation.
Title Check ❓ Inconclusive The title “Update system-variables.md” is too generic and does not convey the primary change of the pull request, which is adding the new tidb_opt_selectivity_factor system variable. Please revise the title to clearly summarize the main change, for example “Add tidb_opt_selectivity_factor system variable to system-variables.md.”
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-add-a-variable-15

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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 (1)
system-variables.md (1)

1794-1803: Match field labels to existing style for consistency.

All other variable entries use the “Persists to cluster”, “Applies to hint [SET_VAR]”, “Type”, and “Range” labels. This new block switches to “Is persisted to the cluster”, “Is controlled by the Hint”, “Type: Floating-point number”, and “Value range”. Please align the labels and wording with the existing convention to keep the reference uniform—for example:

  • Persists to cluster: Yes
  • Applies to hint …: Yes
  • Type: Float
  • Range: [0, 1]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 322c671 and d07ddad.

📒 Files selected for processing (1)
  • system-variables.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

⚙️ CodeRabbit configuration file

As a technical writer in the database area, you need to first learn the changes in this PR, and then improve the content to make it clear, concise, and easy to understand in English according to your database knowledge.

Files:

  • system-variables.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant