Skip to content

docs: add tidb_enable_connection_event_log system variable - #23278

Open
gengliqi wants to merge 4 commits into
pingcap:masterfrom
gengliqi:connection_event_log
Open

docs: add tidb_enable_connection_event_log system variable#23278
gengliqi wants to merge 4 commits into
pingcap:masterfrom
gengliqi:connection_event_log

Conversation

@gengliqi

@gengliqi gengliqi commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

First-time contributors' checklist

What is changed, added or deleted? (Required)

Add tidb_enable_connection_event_log system variable

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.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 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 the tidb_enable_connection_event_log system variable.
    • Clarified that it controls logging of successful client login and logout events.
    • Documented its default value, persistence behavior, and usage limitations.
    • Noted that enabling the setting may generate many log entries for connection-heavy workloads.

gengliqi added 2 commits July 15, 2026 14:17
u
Signed-off-by: gengliqi <gengliqiii@gmail.com>
u
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot

ti-chi-bot Bot commented Jul 15, 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 assign oreoxmt for approval. 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

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 15, 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 introduces documentation for the new system variable tidb_enable_connection_event_log in system-variables.md. The review feedback suggests improving the documentation by removing redundant lines for boolean variables, enhancing sentence structure for parallel phrasing, and adopting the second-person perspective ("your workload") to align with the 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 system-variables.md Outdated
@ti-chi-bot

ti-chi-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Details

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.

@qiancai qiancai added translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jul 16, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Jul 16, 2026
@qiancai qiancai added the v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. label Jul 16, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread system-variables.md Outdated
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation adds the tidb_enable_connection_event_log global system variable. It records successful client login and logout events when enabled.

Changes

Connection event log variable

Layer / File(s) Summary
System variable reference
system-variables.md
Documents the variable's versions, global scope, cluster persistence, OFF default, unsupported SET_VAR usage, and login/logout event logging behavior.

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

Mergeability Score: ⚪ Minimal · up to 789eb

This documentation-only change adds the system variable description and is merge-ready after normal review; the remaining wording cleanup is minor and non-blocking.

Suggested reviewers: qiancai, hfxsd, ti-chi-bot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description covers the required change, affected versions, reference PR, and applicable checklist items; the omitted AI involvement section is non-critical.
Title check ✅ Passed The title clearly and concisely identifies the documentation change for the new system variable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ce2cca38-3a84-4784-8f89-aa67f5d24254

📥 Commits

Reviewing files that changed from the base of the PR and between 6f6cd8a and 789eb7d.

📒 Files selected for processing (1)
  • system-variables.md

Comment thread system-variables.md
- Type: Boolean
- Default value: `OFF`
- This variable controls whether to write successful client login and logout events to the TiDB log.
- If your workload frequently creates and closes connections, enabling this variable can generate a large number of log entries.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace the ambiguous workload warning.

Vale flags “a large number of” as ambiguous. State the impact more directly.

Suggested change
- If your workload frequently creates and closes connections, enabling this variable can generate a large number of log entries.
- If your workload frequently creates and closes connections, enabling this variable can significantly increase the number of log entries.

As per path instructions: “For every actionable issue, provide a GitHub committable suggestion block containing the exact replacement text whenever the fix can be safely and completely applied to contiguous lines in the diff.”

🧰 Tools
🪛 GitHub Check: vale

[warning] 2175-2175:
[vale] reported by reviewdog 🐶
[PingCAP.Ambiguous] Consider using a clearer word than 'a large number of' because it may cause confusion.

Raw Output:
{"message":"[PingCAP.Ambiguous] Consider using a clearer word than 'a large number of' because it may cause confusion.","location":{"path":"system-variables.md","range":{"start":{"line":2175,"column":99},"end":{"line":2175,"column":116}}},"severity":"INFO","code":{"value":"PingCAP.Ambiguous"}}

Sources: Path instructions, Linters/SAST tools

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

Labels

needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants