Skip to content

docs: add statement summary system variables - #23001

Open
nolouch wants to merge 3 commits into
pingcap:masterfrom
nolouch:add-docs-about-stmt
Open

docs: add statement summary system variables#23001
nolouch wants to merge 3 commits into
pingcap:masterfrom
nolouch:add-docs-about-stmt

Conversation

@nolouch

@nolouch nolouch commented Jun 3, 2026

Copy link
Copy Markdown
Member

What is changed

This PR is translated from: pingcap/docs-cn#21694

Add English documentation for two statement summary system variables, corresponding to pingcap/docs-cn#21694:

  • tidb_stmt_summary_group_by_user
  • tidb_stmt_summary_persist_evicted

Updated files:

  • statement-summary-tables.md
  • system-variables.md
  • system-variable-reference.md

Check List

Tests:

  • ./scripts/markdownlint statement-summary-tables.md system-variable-reference.md system-variables.md
  • git diff --check -- statement-summary-tables.md system-variable-reference.md system-variables.md

Summary by CodeRabbit

  • New Features

    • Added tidb_stmt_summary_group_by_user to optionally separate statement summaries by executing user.
    • Added tidb_stmt_summary_persist_evicted to optionally preserve LRU-evicted statement records with an evicted marker.
    • Documented defaults, memory and logging behavior, data clearing, and version-specific guidance.
  • Documentation

    • Added system-variable references and links for both statement summary settings.
    • Clarified that evicted records are logged as JSON and excluded from history query results.

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 3, 2026

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

Copy link
Copy Markdown
Contributor

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 documentation for two new system variables introduced in TiDB v8.5.7: tidb_stmt_summary_group_by_user and tidb_stmt_summary_persist_evicted. The changes span across statement-summary-tables.md, system-variable-reference.md, and system-variables.md. The review comments suggest rewriting several sentences to use the active voice, reducing wordiness, and using "who" instead of "that" when referring to users, in alignment with the repository's documentation style guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
@lilin90 lilin90 added the translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. label Jun 12, 2026
@lilin90 lilin90 self-assigned this Jun 12, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Jun 12, 2026
@lilin90 lilin90 added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Jun 12, 2026
@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qiancai qiancai assigned qiancai and unassigned lilin90 Aug 20, 2026
@qiancai
qiancai self-requested a review August 20, 2026 06:11
Comment thread system-variables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md Outdated
@ti-chi-bot

ti-chi-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

[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 qiancai. 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.

Details 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

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e2f8fcdd-340d-4849-b7a3-6b1d0f5e519e

📥 Commits

Reviewing files that changed from the base of the PR and between c86061a and 7c8957b.

📒 Files selected for processing (3)
  • statement-summary-tables.md
  • system-variable-reference.md
  • system-variables.md

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The documentation adds two GLOBAL statement summary variables. It describes user-based aggregation, LRU-evicted record persistence, defaults, memory effects, log output, and history query behavior.

Changes

Statement summary configuration

Layer / File(s) Summary
System variable references and definitions
system-variables.md, system-variable-reference.md
Adds tidb_stmt_summary_group_by_user and tidb_stmt_summary_persist_evicted as GLOBAL Boolean variables with defaults, effects, and related links.
Statement summary behavior
statement-summary-tables.md
Documents user aggregation, SAMPLE_USER, in-memory clearing, persisted eviction logs, increased log volume, and exclusion from history queries.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 7c895

The PR only adds documentation for two system variables. No actionable merge-blocking risk remains; the normal link-anchor check should confirm that the new references resolve correctly.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the changes and lists validation, but it omits the required affected TiDB version section and other template fields. Add the required TiDB version selection and complete the applicable template sections, including related links and change-impact checkboxes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the addition of statement summary system variables to the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Comment thread system-variables.md
</CustomContent>

### tidb_stmt_summary_persist_evicted <span class="version-mark">New in TiDB-X-CLOUD.202603.1</span>

@qiancai qiancai Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
> **Note:**
>
> This variable is supported only for TiDB Cloud Essential and Premium instances whose kernel version is TiDB-X-CLOUD.202603.1 or later.

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

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants