Skip to content

docs: support logging session connect attrs to slow query log #21468

Merged
ti-chi-bot[bot] merged 12 commits intopingcap:masterfrom
hfxsd:codex/docs-sync-tidb-pr-66617-22547
Mar 30, 2026
Merged

docs: support logging session connect attrs to slow query log #21468
ti-chi-bot[bot] merged 12 commits intopingcap:masterfrom
hfxsd:codex/docs-sync-tidb-pr-66617-22547

Conversation

@hfxsd
Copy link
Copy Markdown
Collaborator

@hfxsd hfxsd commented Mar 26, 2026

First-time contributors' checklist

What is changed, added or deleted? (Required)

This PR updates docs according to pingcap/tidb#66617:

  • Add Session_connect_attrs (json) to the schema examples of INFORMATION_SCHEMA.SLOW_QUERY and INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY.
  • Add the system variable doc for performance_schema_session_connect_attrs_size (default/range/-1 behavior/truncation/1 MiB hard limit note).
  • Add status variable docs:
    • Performance_schema_session_connect_attrs_longest_seen
    • Performance_schema_session_connect_attrs_lost
  • Update SESSION_CONNECT_ATTRS doc with size limit and truncation behavior.

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)
  • 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

@hfxsd hfxsd added translation/from-docs This PR is translated from a PR in pingcap/docs. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. labels Mar 26, 2026
@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 26, 2026
@hfxsd hfxsd requested a review from jiong-nba March 26, 2026 13:13
@hfxsd hfxsd self-assigned this Mar 26, 2026
Synced from: pingcap/docs#22547
Target PR: pingcap#21468
AI Provider: gemini

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 26, 2026
Comment thread status-variables.md Outdated
Comment thread status-variables.md Outdated
Comment thread status-variables.md Outdated
Comment thread system-variable-reference.md Outdated
hfxsd added 4 commits March 26, 2026 21:27
Add documentation about the maximum size and truncation behavior for session connection attributes. Introduces a “大小限制与截断” section in performance-schema session connect attrs doc describing the global variable performance_schema_session_connect_attrs_size (default 4096, range [-1,65536], -1 treated as 65536, 0 disables recording), how excess bytes are truncated with a `_truncated` marker, and that accepted attributes are written to slow logs and queryable via INFORMATION_SCHEMA. Also update system-variables.md with a Chinese-localized entry for performance_schema_session_connect_attrs_size and translate the note about the 1 MiB hard handshake limit that rejects oversized connections.
Comment thread status-variables.md Outdated
Comment thread status-variables.md Outdated
Comment thread system-variable-reference.md Outdated
Comment thread system-variables.md Outdated
Comment thread performance-schema/performance-schema-session-connect-attrs.md
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 27, 2026

@zhaoshangzi: 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.

Co-authored-by: zhaoshangzi <zhaoshangzi@icloud.com>
Comment thread performance-schema/performance-schema-session-connect-attrs.md Outdated
Copy link
Copy Markdown

@jiong-nba jiong-nba 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
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 27, 2026

@jiong-nba: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

LGTM

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.

@hfxsd hfxsd requested a review from lilin90 March 30, 2026 07:37
Comment thread information-schema/information-schema-slow-query.md
Comment thread system-variable-reference.md Outdated
Comment thread system-variables.md Outdated
lilin90 added 2 commits March 30, 2026 15:43
Co-authored-by: Lilian Lee <lilin@pingcap.com>
Co-authored-by: Lilian Lee <lilin@pingcap.com>
Copy link
Copy Markdown
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 Mar 30, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 30, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-03-30 07:46:02.797427403 +0000 UTC m=+164768.002787460: ☑️ agreed by lilin90.

@hfxsd
Copy link
Copy Markdown
Collaborator Author

hfxsd commented Mar 30, 2026

/approve

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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

The pull request process is described 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 the approved label Mar 30, 2026
@ti-chi-bot ti-chi-bot Bot merged commit 69e6996 into pingcap:master Mar 30, 2026
11 checks passed
@hfxsd hfxsd added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Apr 20, 2026
@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #21577.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/docs-cn that referenced this pull request Apr 20, 2026
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. 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.

5 participants