You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closed PD client TSO streams retain metric children labeled with unique stream IDs. Repeated TiDB keyspace runtime creation and closure can grow retained memory.
What changed and how does it work?
Update github.com/tikv/pd/client from dbc621c03214 to merged PD commit 9de8977ba632 (tikv/pd#11716), and regenerate DEPS.bzl with make bazel_prepare. The PD client now deletes both TSO stream metric children before WaitForClosed returns.
This revision also includes intervening PD client updates to TSO request completion and affinity and GC APIs.
In response to a cherrypick label: @D3Hunter once the present PR merges, I will cherry-pick it on top of release-nextgen-20251011 in a new PR and assign it to you.
In response to a cherrypick label: @D3Hunter once the present PR merges, I will cherry-pick it on top of release-nextgen-202603 in a new PR and assign it to you.
In response to a cherrypick label: @D3Hunter once the present PR merges, I will cherry-pick it on top of release-nextgen-202609 in a new PR and assign it to you.
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign bb7133 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:
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 0bac66a5-eaad-442c-9c3c-05026239073e
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The PD client dependency pin changes to v0.0.0-20261127111241-9de8977ba632 in go.mod and DEPS.bzl. The Bazel checksum also changes.
Changes: PD client dependency update
Layer / File(s)
Summary
Update PD client dependency pin go.mod, DEPS.bzl
Both dependency declarations use version v0.0.0-20261127111241-9de8977ba632. DEPS.bzl uses the corresponding updated checksum.
Merge Risk: Minimal · up to 0bc6a · assessed changes only
Merge Risk:⚪ Minimal · up to 0bc6a
Path filters excluded changed files. This rating applies only to the assessed changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title ": update PD client to remove closed TSO stream metrics" follows the repository's ": what's changed" format. It names the main change: a PD client update that removes metrics for closed TS…
Description check
The description follows the repository template. It has an Issue Number line (close #73899), a problem summary, a what-changed section with the dependency update and regeneration steps, a checklist wi…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title ": update PD client to remove closed TSO stream metrics" follows the repository's ": what's changed" format. It names the main change: a PD client update that removes metrics for closed TSO streams. The raw summary only describes a version bump in DEPS.bzl and go.mod, so it does not show the metric-removal code itself. The PR description and objectives say the bumped PD client deletes both TSO stream metric children before WaitForClosed returns, so the title matches the stated intent.
Full details: Description check
Explanation
The description follows the repository template. It has an Issue Number line (close #73899), a problem summary, a what-changed section with the dependency update and regeneration steps, a checklist with unit tests checked and three test commands listed, and a release note. The integration, manual, and side-effect boxes are unchecked, which is acceptable because the unit tests are included. The description does not fill in the template's comment-style sections as the template expects, but the required content is present.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Fix failing CI checks
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit checks the pins in place, The Go and Bazel versions match. A checksum hops to join the change, Then settles softly in its patch. The rabbit wiggles both its ears.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 7ea02165-5d03-4dc4-8a06-2ffbd6cde389
Commits
Reviewing files that changed from the base of the PR and between 7279155 and e6d4afb.
Files ignored due to path filters: 1
go.sum is excluded by !**/*.sum
Files selected for processing: 2
DEPS.bzl
go.mod
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
ti-chi-botBot
added
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
and removed
size/XS
Denotes a PR that changes 0-9 lines, ignoring generated files.
labels
Nov 29, 2026
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #73899
Problem Summary:
Closed PD client TSO streams retain metric children labeled with unique stream IDs. Repeated TiDB keyspace runtime creation and closure can grow retained memory.
What changed and how does it work?
Update
github.com/tikv/pd/clientfromdbc621c03214to merged PD commit9de8977ba632(tikv/pd#11716), and regenerateDEPS.bzlwithmake bazel_prepare. The PD client now deletes both TSO stream metric children beforeWaitForClosedreturns.This revision also includes intervening PD client updates to TSO request completion and affinity and GC APIs.
Check List
Tests
./tools/check/failpoint-go-test.sh pkg/store/driver -run '^TestSetDefaultAndOptions$' -count=1./tools/check/failpoint-go-test.sh pkg/ddl -run '^TestAffinityPDInteraction$' -count=1client/module at9de8977ba632:make gotest GOTEST_ARGS='./clients/tso -run TestTSOStreamMetricLabelsRemovedOnClose -count=1'Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit