Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/tidb_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
go-version:
description: Go version to setup
required: false
default: "1.25"
default: "1.26.8"
bazelrc:
description: Bazelrc content from secrets
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bazel-build-crossbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
bazelrc: ${{ secrets.BAZELRC }}
gcp_sa_key: ${{ secrets.GCP_SA_KEY }}
go-version: 1.25
go-version: 1.26.8
- name: Run Build
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bazel-lint-crossbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
bazelrc: ${{ secrets.BAZELRC }}
gcp_sa_key: ${{ secrets.GCP_SA_KEY }}
go-version: 1.25
go-version: 1.26.8
- name: Run Bazel Lint
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-bazel-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 1.25
go-version: 1.26.8
cache: false
- name: Set up Bazelisk
uses: bazel-contrib/setup-bazel@8310a45e30297e76bc8fbae427fb6068efa01eb8 # 0.16.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-bazel-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
bazelrc: ""
gcp_sa_key: ""
go-version: 1.25
go-version: 1.26.8
- name: Run Bazel Prepare
shell: bash
run: |
Expand Down
10 changes: 6 additions & 4 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3777,8 +3777,9 @@ def go_deps():
name = "com_github_pingcap_kvproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/kvproto",
sum = "h1:Z1gFEBIzhT7Cuc0IBAsKgUxMapL2kwqe3QQq7g9XiJw=",
version = "v0.0.0-20260820070758-623e58e60fa9",
replace = "github.com/JmPotato/kvproto",
sum = "h1:7QHq/GlSggwICab7ETDp9ike7ED5XKLkTrfuJMlZasU=",
version = "v0.0.0-20260920123146-2a45fb4cd2dc",
)
go_repository(
name = "com_github_pingcap_log",
Expand Down Expand Up @@ -4535,8 +4536,9 @@ def go_deps():
build_tags = ["nextgen", "intest"],
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
sum = "h1:q5NgKsvuOdEHspG/pZEpKhWlPLrIfmO8P/lDFjTEdok=",
version = "v0.0.0-20260805103528-afa43111d149",
replace = "github.com/JmPotato/pd/client",
sum = "h1:CHOo1sUgbo6TKSEbQuZvYZhd4cyiGbp7FJH2poExHdM=",
version = "v0.0.0-20260920124512-fb47e16dd8d6",
)
go_repository(
name = "com_github_timakin_bodyclose",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# production environment, please refer to https://github.com/PingCAP-QE/artifacts/blob/main/dockerfiles/cd/builders/tidb/Dockerfile.

# Builder image
FROM golang:1.25.12@sha256:9006890ecba0a168034d99516084099ae3114d9f2b7d6572c77f2dde57ebc980 as builder
FROM golang:1.26.8@sha256:6c2a5538f964f1c82f97ad14988bf05de100d922d159d0e398b54c7b0ca0c6c9 as builder
WORKDIR /tidb

COPY . .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.enterprise
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# The current dockerfile is only used for development purposes.
# Builder image
FROM golang:1.25.12@sha256:9006890ecba0a168034d99516084099ae3114d9f2b7d6572c77f2dde57ebc980 as builder
FROM golang:1.26.8@sha256:6c2a5538f964f1c82f97ad14988bf05de100d922d159d0e398b54c7b0ca0c6c9 as builder
WORKDIR /tidb

COPY . .
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ go_download_sdk(
"https://mirrors.aliyun.com/golang/{}",
"https://dl.google.com/go/{}",
],
version = "1.25.12",
version = "1.26.8",
)

gazelle_dependencies(go_sdk = "go_sdk")
Expand Down
2 changes: 1 addition & 1 deletion build/image/base
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/var/cache/dnf \

# install golang toolchain
# renovate: datasource=docker depName=golang
ARG GOLANG_VERSION=1.25.12
ARG GOLANG_VERSION=1.26.8
RUN OS=linux; ARCH=$([ "$(arch)" = "x86_64" ] && echo amd64 || echo arm64); \
curl -fsSL https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz | tar -C /usr/local -xz
ENV PATH /usr/local/go/bin/:$PATH
Expand Down
2 changes: 1 addition & 1 deletion build/image/parser_test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

FROM rockylinux:9

ENV GOLANG_VERSION 1.25.12
ENV GOLANG_VERSION 1.26.8
ENV ARCH amd64
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-$ARCH.tar.gz
ENV GOPATH /home/prow/go
Expand Down
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/tidb

go 1.25.12
go 1.26.8

require (
cloud.google.com/go/kms v1.21.0
Expand Down Expand Up @@ -98,7 +98,7 @@ require (
github.com/pingcap/errors v0.11.5-0.20260508054701-306e305bcf41
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
github.com/pingcap/fn v1.0.0
github.com/pingcap/kvproto v0.0.0-20260820070758-623e58e60fa9
github.com/pingcap/kvproto v0.0.0-20260903054228-107095f1d250
github.com/pingcap/log v1.1.1-0.20250917021125-19901e015dc9
github.com/pingcap/metering_sdk v0.0.0-20260814062708-9e3b68cd9adf
github.com/pingcap/sysutil v1.0.1-0.20240311050922-ae81ee01f3a5
Expand All @@ -122,7 +122,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.142
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tikv/client-go/v2 v2.0.8-0.20260918070520-787f20af357c
github.com/tikv/pd/client v0.0.0-20260805103528-afa43111d149
github.com/tikv/pd/client v0.0.0-20260920071713-06d2961669dd
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67
github.com/twmb/murmur3 v1.1.6
github.com/uber/jaeger-client-go v2.22.1+incompatible
Expand Down Expand Up @@ -373,3 +373,7 @@ replace (
sourcegraph.com/sourcegraph/appdash => github.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0
sourcegraph.com/sourcegraph/appdash-data => github.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67
)

replace github.com/tikv/pd/client v0.0.0-20260920071713-06d2961669dd => github.com/JmPotato/pd/client v0.0.0-20260920124512-fb47e16dd8d6

replace github.com/pingcap/kvproto v0.0.0-20260903054228-107095f1d250 => github.com/JmPotato/kvproto v0.0.0-20260920123146-2a45fb4cd2dc
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,10 @@ github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/JmPotato/kvproto v0.0.0-20260920123146-2a45fb4cd2dc h1:7QHq/GlSggwICab7ETDp9ike7ED5XKLkTrfuJMlZasU=
github.com/JmPotato/kvproto v0.0.0-20260920123146-2a45fb4cd2dc/go.mod h1:z6+aAHB7dBkA+LyinEX+48/ImRJ3jag0Hg0c7wkhEvE=
github.com/JmPotato/pd/client v0.0.0-20260920124512-fb47e16dd8d6 h1:CHOo1sUgbo6TKSEbQuZvYZhd4cyiGbp7FJH2poExHdM=
github.com/JmPotato/pd/client v0.0.0-20260920124512-fb47e16dd8d6/go.mod h1:uM6ig/rsFSi18AhF3cHOqk4NUVFr5eS3vMQMrqoYsQM=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
Expand Down Expand Up @@ -2176,8 +2180,6 @@ github.com/pingcap/fn v1.0.0/go.mod h1:u9WZ1ZiOD1RpNhcI42RucFh/lBuzTu6rw88a+oF2Z
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E=
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=
github.com/pingcap/kvproto v0.0.0-20260820070758-623e58e60fa9 h1:Z1gFEBIzhT7Cuc0IBAsKgUxMapL2kwqe3QQq7g9XiJw=
github.com/pingcap/kvproto v0.0.0-20260820070758-623e58e60fa9/go.mod h1:z6+aAHB7dBkA+LyinEX+48/ImRJ3jag0Hg0c7wkhEvE=
github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM=
github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
github.com/pingcap/log v1.1.1-0.20250917021125-19901e015dc9 h1:qG9BSvlWFEE5otQGamuWedx9LRm0nrHvsQRQiW8SxEs=
Expand Down Expand Up @@ -2370,8 +2372,6 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/tikv/client-go/v2 v2.0.8-0.20260918070520-787f20af357c h1:e2GcofWhqtCKREy73l6oX6SbJxzwmS9Wl4LRzXfHzDQ=
github.com/tikv/client-go/v2 v2.0.8-0.20260918070520-787f20af357c/go.mod h1:4pMn4TwlKD9CIiRXT3d6d+iNVf3PPBoxYw/LSnYmS9g=
github.com/tikv/pd/client v0.0.0-20260805103528-afa43111d149 h1:q5NgKsvuOdEHspG/pZEpKhWlPLrIfmO8P/lDFjTEdok=
github.com/tikv/pd/client v0.0.0-20260805103528-afa43111d149/go.mod h1:sfdha4LXeUkSs2Z7N5jLzDEtm0GE7x+Glm2pW3UgEpA=
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk=
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460=
github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
Expand Down
27 changes: 11 additions & 16 deletions pkg/metrics/grafana/tidb_resource_control.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"description": "The max request unit cost for resource groups during in a period(20s).",
"description": "Maximum combined read and write RU/s in one natural second across clients. Each point shows the busiest second in the preceding minute, timestamped at the minute end and published about 30 seconds later. Compare with RU, which shows average consumption rates. Longer display intervals keep the maximum. Incomplete intervals remain gaps. Requires enable-ru-minute-peak and complete source coverage; excludes SQL CPU RU, RUv2 and untimed TiFlash aggregates.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand All @@ -265,11 +265,12 @@
"y": 0
},
"id": 5,
"interval": "1m",
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
Expand All @@ -292,24 +293,18 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(resource_manager_resource_unit_read_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}) by (resource_group)",
"expr": "max_over_time(resource_manager_resource_unit_peak_per_second{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) and (min_over_time(resource_manager_resource_unit_peak_available{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == 1) and (count_over_time(resource_manager_resource_unit_peak_available{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == $__interval_ms / 60000) and (count_over_time(resource_manager_resource_unit_peak_per_second{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == $__interval_ms / 60000)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-read",
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "{{resource_group}}",
"refId": "A"
},
{
"expr": "sum(resource_manager_resource_unit_write_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}) by (resource_group)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-write",
"refId": "B"
}
],
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "RU Max(Max Cost During 20s Period)",
"title": "RU Max - 1s",
"tooltip": {
"shared": true,
"sort": 0,
Expand All @@ -327,17 +322,17 @@
{
"format": "short",
"label": null,
"logBase": 10,
"logBase": 1,
"max": null,
"min": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"min": 0,
"show": true
}
]
Expand Down
34 changes: 21 additions & 13 deletions pkg/metrics/grafana/tidb_resource_control.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -244,25 +244,33 @@ local RUPanel = graphPanel.new(
)
);

// Each sample represents one completed UTC minute. Keep the range equal to
// the display step and require every minute, including quality samples.
local RUPeakSelector = '{k8s_cluster="$k8s_cluster", tidb_cluster="$tidb_cluster", resource_group=~"$resource_group"}';
local RUPeakSeries = 'resource_manager_resource_unit_peak_per_second' + RUPeakSelector;
local RUPeakAvailable = 'resource_manager_resource_unit_peak_available' + RUPeakSelector;
local RUMaxPanel = graphPanel.new(
title="RU Max(Max Cost During 20s Period)",
title="RU Max - 1s",
datasource=myDS,
legend_rightSide=true,
format="short",
interval="1m",
nullPointMode="null",
min=0,
legend_values=true,
legend_max=true,
legend_current=true,
legend_rightSide=true,
legend_alignAsTable=true,
legend_values=true,
format="short",
description="The max request unit cost for resource groups during in a period(20s).",
logBase1Y=10,
description="Maximum combined read and write RU/s in one natural second across clients. Each point shows the busiest second in the preceding minute, timestamped at the minute end and published about 30 seconds later. Compare with RU, which shows average consumption rates. Longer display intervals keep the maximum. Incomplete intervals remain gaps. Requires enable-ru-minute-peak and complete source coverage; excludes SQL CPU RU, RUv2 and untimed TiFlash aggregates.",
).addTarget(
prometheus.target(
'sum(resource_manager_resource_unit_read_request_unit_max_per_sec{k8s_cluster="$k8s_cluster", tidb_cluster="$tidb_cluster", resource_group=~"$resource_group"}) by (resource_group)',
legendFormat="{{resource_group}}-read",
)
).addTarget(
prometheus.target(
'sum(resource_manager_resource_unit_write_request_unit_max_per_sec{k8s_cluster="$k8s_cluster", tidb_cluster="$tidb_cluster", resource_group=~"$resource_group"}) by (resource_group)',
legendFormat="{{resource_group}}-write",
'max_over_time(' + RUPeakSeries + '[$__interval])' +
' and (min_over_time(' + RUPeakAvailable + '[$__interval]) == 1)' +
' and (count_over_time(' + RUPeakAvailable + '[$__interval]) == $__interval_ms / 60000)' +
' and (count_over_time(' + RUPeakSeries + '[$__interval]) == $__interval_ms / 60000)',
legendFormat="{{resource_group}}",
interval="1m",
intervalFactor=1,
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"description": "The max request unit cost for resource groups during in a period(20s).",
"description": "Maximum combined read and write RU/s in one natural second across clients. Each point shows the busiest second in the preceding minute, timestamped at the minute end and published about 30 seconds later. Compare with RU, which shows average consumption rates. Longer display intervals keep the maximum. Incomplete intervals remain gaps. Requires enable-ru-minute-peak and complete source coverage; excludes SQL CPU RU, RUv2 and untimed TiFlash aggregates.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand All @@ -260,11 +260,12 @@
"y": 0
},
"id": 5,
"interval": "1m",
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
Expand All @@ -287,24 +288,18 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(resource_manager_resource_unit_read_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}) by (resource_group)",
"expr": "max_over_time(resource_manager_resource_unit_peak_per_second{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) and (min_over_time(resource_manager_resource_unit_peak_available{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == 1) and (count_over_time(resource_manager_resource_unit_peak_available{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == $__interval_ms / 60000) and (count_over_time(resource_manager_resource_unit_peak_per_second{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}[$__interval]) == $__interval_ms / 60000)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-read",
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "{{resource_group}}",
"refId": "A"
},
{
"expr": "sum(resource_manager_resource_unit_write_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", resource_group=~\"$resource_group\"}) by (resource_group)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-write",
"refId": "B"
}
],
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "RU Max(Max Cost During 20s Period)",
"title": "RU Max - 1s",
"tooltip": {
"shared": true,
"sort": 0,
Expand All @@ -322,17 +317,17 @@
{
"format": "short",
"label": null,
"logBase": 10,
"logBase": 1,
"max": null,
"min": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"min": 0,
"show": true
}
]
Expand Down
Loading
Loading