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: tidb_opt_selectivity_factor.
    • Describes purpose (optimizer default selectivity when statistics are insufficient), default value (0.8), valid range ([0, 1]), and scopes (SESSION and GLOBAL).
    • Notes it can be adjusted via SET_VAR but is generally not recommended to change.
    • Placed alongside related selectivity settings for easier discoverability.

@gemini-code-assist
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 intended for updating the documentation related to TiDB system variables, specifically mentioning the addition of tidb_opt_selectivity_factor and per-operator executor concurrency controls. However, the actual changes provided in the patch only include the addition of a new file, temp.md, containing simple test content. This suggests a potential mismatch between the PR's stated intent and its current patch content.

Highlights

  • File Addition: A new file named temp.md has been added to the repository.
  • Content of temp.md: The temp.md file contains the simple text 'This is a test file.'.
  • Stated Purpose Discrepancy: While the pull request title and description indicate an update to system-variables.md and related feature documentation, the provided patch only shows the addition of temp.md.
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

There appears to be a significant discrepancy in this pull request. The title, description, and auto-generated summary all indicate that the system-variables.md file should be updated. However, the only change submitted is the addition of a placeholder file named temp.md. Please review the pull request to ensure it includes the intended changes. For the file that was submitted, I have included one minor suggestion.

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

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

🤖 Auto-sync completed successfully

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

This comment was generated automatically by the sync workflow.

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

Adds documentation for a new system variable tidb_opt_selectivity_factor (SESSION | GLOBAL, SET_VAR-enabled, float in [0,1], default 0.8) describing its role in optimizer selectivity fallback. The same variable block appears twice in nearby sections, creating a duplicate entry.

Changes

Cohort / File(s) Summary
Docs — System variables
system-variables.md
Added documentation for tidb_opt_selectivity_factor (scope SESSION/GLOBAL, SET_VAR, default 0.8, range [0,1]) describing its use when selectivity cannot be derived from stats; introduced a duplicated block of the same variable in a nearby section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble notes on fields so fair,
A factor set with careful care—
When stats go shy, we guess the share,
But oops, I see it listed there… and there!
I twitch my whiskers, fix the pair,
Then hop along with tidy flair. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “Update system-variables.md” is overly generic and only names the file being modified without indicating the substantive change, which is the introduction of the new tidb_opt_selectivity_factor system variable; it does not clearly convey the primary purpose or scope of the update. Please revise the title to succinctly describe the main change, for example “Add tidb_opt_selectivity_factor system variable to system-variables.md,” so that reviewers immediately understand the key update.
Description Check ⚠️ Warning The description includes the standard template structure but leaves critical sections blank—no details are provided for “What is changed, added or deleted,” and the version checklist is entirely unchecked—making it impossible to understand the nature and scope of the changes. Please fill in the “What is changed, added or deleted?” section with a summary of the new tidb_opt_selectivity_factor variable, mark the applicable TiDB version(s) in the checklist, and confirm any related PR links or CLA status.
✅ 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)

1796-1801: Align metadata labels with existing variable templates

Other entries in this reference use “Persists to cluster”, “Applies to hint [SET_VAR]”, “Type: Float”, and “Range” for these bullets. Please update this block to match the established wording so we stay consistent across the page.

- - Is persisted to the cluster: Yes
- - Is controlled by the Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
- - Type: Floating-point number
- - Value range: `[0, 1]`
+ - Persists to cluster: Yes
+ - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): 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 351e82b.

📒 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

@qiancai qiancai closed this Sep 29, 2025
@qiancai qiancai deleted the test-add-a-variable-15 branch September 29, 2025 03:32
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.

2 participants