Commit Graph

328 Commits

Author SHA1 Message Date
JmPotato 50a938a710
chore(deps): bump Go to 1.23.12 and update tidb-dashboard dependency (#9787)
ref tikv/pd#4399

- Upgraded Go version from 1.23.0 → 1.23.12 to adopt security fixes.
- Updated github.com/pingcap/tidb-dashboard to latest commit (e111aaee93).

Signed-off-by: JmPotato <github@ipotato.me>
2025-09-29 03:18:58 +00:00
hujiatao 9450168983
scheduler: graceful shutdown implement (#9720)
close tikv/pd#9719

Add an is_stopping status to the StoreHeartbeat message. When TiKV receives a SIGTERM, it sets this flag. This change adds a new evict-stopping-store-scheduler to PD, which is analogous to the evict-slow-store-scheduler. It proactively transfers leaders away from nodes by inspecting the is_stopping status from store heartbeats.

Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
2025-09-28 06:46:16 +00:00
JmPotato 0b32e6e185
feat(metering): add storage size metering and keyspace name caching (#9774)
ref tikv/pd#9707

- Introduced storage size metering:  
  - Added `storageSizeCollector` to periodically record row-based and column-based storage usage per keyspace.  
  - Integrated with cluster metering writer for reporting.  
- Extended `RegionInfo` and statistics with `ApproximateColumnarKvSize` tracking.  
- Added keyspace name caching and lookup in `KeyspaceManager` for efficient resolution.  
- Extracted common metering utilities (`NewRUValue`, `NewBytesValue`, constants for source/fields) into `pkg/metering/utils.go`.

Signed-off-by: JmPotato <github@ipotato.me>
2025-09-25 10:38:55 +00:00
Ryan Leung f9be8dd186
mcs: support bucket for scheduling service (#9728)
ref tikv/pd#5839

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-09-25 08:31:07 +00:00
Neil Shen e2f7162d73
chore(dashboard): update TiDB Dashboard to 20250908031600-468ef95996bb (#9770)
ref tikv/pd#4257, close tikv/pd#9405

Upgrade TiDB Dashboard to fix login issue when keyspace is enabled.

Signed-off-by: Neil Shen <overvenus@gmail.com>
2025-09-23 08:13:58 +00:00
Ryan Leung a89e236124
mcs: implement basic framework of router service (#9696)
ref tikv/pd#9212

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-09-22 05:32:31 +00:00
JmPotato 71f13dd743
feat(metering): update SDK dependency and integrate config-based writer initialization (#9760)
ref tikv/pd#9707

- Bumped `github.com/pingcap/metering_sdk` to latest version.  
- Switched writer initialization from `NewMeteringWriter` to `NewMeteringWriterFromConfig`.

Signed-off-by: JmPotato <github@ipotato.me>
2025-09-18 09:37:41 +00:00
JmPotato e2ce53841d
feat(metering): integrate RU metering and flush to object storage (#9717)
ref tikv/pd#9707

- Introduced a new **metering writer** (`pkg/metering`) that collects RU usage data and periodically flushes it to object storage via `pingcap/metering_sdk`.
- Implemented a **RU collector** (`ruCollector`) in the resource manager to track resource usage (OLTP/OLAP RU, cross-AZ traffic) per keyspace.

Signed-off-by: JmPotato <github@ipotato.me>
2025-09-12 07:50:03 +00:00
okJiang 14eb016237
scheduler: implement network slow store scheduler (#9451)
ref tikv/pd#9359

Signed-off-by: okjiang <819421878@qq.com>
2025-08-25 09:26:07 +00:00
Ryan Leung 59b75f576c
tests: fix stale failpoint (#9573)
ref tikv/pd#4791

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-07-23 06:46:17 +00:00
tongjian 0bd02197ba
api: fix some wrong metrics and add bucket version (#9561)
close tikv/pd#9557

Signed-off-by: 童剑 <1045931706@qq.com>
2025-07-22 02:34:47 +00:00
Ryan Leung e2abc033f3
*: add leakcheck (#9563)
ref tikv/pd#7782

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-07-18 06:54:33 +00:00
JmPotato 735fcade52
deps(master): update to fix the vulnerabilities (#9559)
close tikv/pd#9556

Update the third-party dependencies to address vulnerabilities.

Signed-off-by: JmPotato <github@ipotato.me>
2025-07-18 03:08:18 +00:00
Sparkle 72a9baa1d0
chore(dashboard): update TiDB Dashboard to v9.0.0-e1f8338b [master] (#9463)
ref tikv/pd#4257

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-07-03 07:19:36 +00:00
glorv fb496b371f
msc/resourcemanager: support reporting cross AZ traffic in ru consumption (#9410)
close tikv/pd#9409

Signed-off-by: glorv <glorvs@163.com>
2025-06-25 07:30:39 +00:00
Lynn 7c6ec2ad12
*: update tidb-dashboard dependence (#9404)
close tikv/pd#9405

Signed-off-by: Lynn <zimu_xia@126.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-06-12 10:15:52 +00:00
GMHDBJD 29ead019cd
add failed_regions_id for scatter regions response (#9167)
close tikv/pd#9088

Signed-off-by: gmhdbjd <gmhdbjd@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-06-11 12:26:55 +00:00
lhy1024 ab4a4dcc6f
mcs: update client and grpc server with keyspace id in resource group (#9339)
ref tikv/pd#9296

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-05-22 05:54:37 +00:00
MyonKeminta 04f1ae0611
server: Add gRPC interfaces for the new GC APIs. (#9189)
ref tikv/pd#8978

Add new gRPC API for GC as designed in the refactor task #8978 .
Also adapts the existing GC APIs to the new implementation.

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-05-15 08:57:45 +00:00
Ryan Leung bf5ccc308e
*: upgrade dependencies (#9213)
ref tikv/pd#4764

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-04-18 07:27:40 +00:00
Ryan Leung aae12d90b9
pkg: remove auto scaling (#9205)
close tikv/pd#9206

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-04-16 09:17:06 +00:00
Ryan Leung c828ec8d22
*: enable more linters and fix some code (#9115)
ref tikv/pd#4322

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-03-05 16:57:17 +00:00
tongjian 6504311c25
metrics: support pyroscope for continous profile (#8958)
close tikv/pd#8957

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-02-24 09:16:15 +00:00
Ryan Leung a5c1101e6e
mcs: support batch allocating ids (#9092)
close tikv/pd#9085

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-02-24 09:04:33 +00:00
Sparkle b757cbe8f9
chore(dashboard): update TiDB Dashboard to v9.0.0-d6201812 [master] (#9084)
ref tikv/pd#4257

Signed-off-by: baurine <2008.hbl@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-02-19 08:41:18 +00:00
Ryan Leung 30e8ed7182
*: update dependencies (#9067)
ref tikv/pd#4764

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-02-11 09:52:11 +00:00
JmPotato a69ee01287
server, core: implement the query region gRPC server (#8979)
ref tikv/pd#8690

Implement the query region gRPC server interface.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2025-01-17 14:10:01 +00:00
lucasliang 9805a9541a
cluster: return NodeState in the response of StoreHeartbeat. (#8991)
close tikv/pd#9001, ref tikv/tikv#18042, ref tikv/tikv#18107

In this PR, it returns the `NodeState` in `StoreHeartbeatResponse` to store nodes,
to notify the corresponsive store to handle it if necessary.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-01-17 04:07:16 +00:00
okJiang 7a30ebc972
server: advance ServerStart check (#8951)
close tikv/pd#8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-01-02 07:35:42 +00:00
tongjian ac5967544f
Metrics: Go runtime metrics (#8927)
close tikv/pd#8931

Signed-off-by: bufferflies <1045931706@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-12-19 07:01:00 +00:00
okJiang 88a761e527
dep: update github.com/aws/aws-sdk-go-v2/service/kms to v1.26.3 (#8923)
ref tikv/pd#4399

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-12-17 11:16:00 +00:00
okJiang 7df0ff911d
*: upgrade github.com/aws/aws-sdk-go-v2/config from v1.18 to v1.25 (#8883)
ref tikv/pd#4399

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-12-09 09:34:33 +00:00
okJiang 0da1b114ee
grpc: add caller info to client and wrap innerClient (#8704)
ref tikv/pd#8593

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-11-20 16:34:56 +00:00
Sparkle cfd8f3436e
chore(dashboard): update TiDB Dashboard to v8.5.0-bce95733 [master] (#8764)
ref tikv/pd#4257

Signed-off-by: baurine <2008.hbl@gmail.com>
2024-11-05 08:31:56 +00:00
Ryan Leung 697d907bf9
*: upgrade go to 1.23 (#8637)
close tikv/pd#8644

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-10-08 03:29:12 +00:00
Sparkle ade5a93a77
chore(dashboard): update TiDB Dashboard to v8.4.0-618b5cde [master] (#8656)
ref tikv/pd#4257

Signed-off-by: baurine <2008.hbl@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-09-24 06:35:35 +00:00
JmPotato edb43c0538
go.mod: upgrade gin-gonic/gin to v1.10.0 (#8646)
close tikv/pd#8643

Update gin-gonic/gin to v1.10.0 to adopt the latest vulnerability fix.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2024-09-23 09:47:35 +00:00
glorv 0ca83cf1cd
resource_manager: support set background resource limit (#8617)
close tikv/pd#8616

update kvproto to include pingcap/kvproto#1264 to support set background task resource limit

Signed-off-by: glorv <glorvs@163.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-09-12 08:40:22 +00:00
dependabot[bot] b5c4a58d5c
build(deps): bump github.com/gin-contrib/cors from 1.4.0 to 1.6.0 (#8610)
ref tikv/pd#4399

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-09-10 06:38:53 +00:00
Sparkle a4ae781d07
chore(dashboard): update TiDB Dashboard to v8.4.0-6a0d342d [master] (#8581)
ref tikv/pd#4257

Signed-off-by: mornyx <mornyx.z@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Co-authored-by: mornyx <mornyx.z@gmail.com>
2024-09-05 03:08:52 +00:00
Ryan Leung 1b8fc6a950
*: add linters to organize import dependency (#8532)
ref tikv/pd#4322

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-08-15 06:17:40 +00:00
lhy1024 cc2900c42e
*: upgrade etcd to v3.5.15 (#8441)
close tikv/pd#3877, ref tikv/pd#5134

Signed-off-by: lhy1024 <admin@liudos.us>
2024-08-15 05:56:40 +00:00
Ryan Leung a17ff35da8
*: upgrade go-graphviz (#8423)
close tikv/pd#8422

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-07-19 10:04:31 +00:00
Sparkle 3bb69e66df
chore(dashboard): update TiDB Dashboard to v8.3.0-e6e78c7c [master] (#8420)
ref tikv/pd#4257

Signed-off-by: baurine <2008.hbl@gmail.com>
2024-07-18 10:04:32 +00:00
okJiang 0b5ed0fce6
client: report error when scan region encounter hole region (#8375)
close tikv/pd#8358

client: report error when scan region encounter hole region
- add a input parameter(OutputMustContainAllKeyRange) in the BatchScanRegionsRequest
- when the new param enable and find the result doesn't contain all key range(input), it will return an error to user
- add Merge() method to merge the continuous KeyRanges
- pull out the scanRegion function and add unit tests for it

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-07-17 06:10:30 +00:00
Sparkle 3b051d727d
chore(dashboard): update TiDB Dashboard to v8.2.0-91f6c281 [master] (#8315)
ref tikv/pd#4257

Signed-off-by: baurine <2008.hbl@gmail.com>
2024-06-21 05:34:18 +00:00
you06 049de1761e
api: client and server support `BatchScanRegions` (#8300)
close tikv/pd#8307, ref pingcap/tidb#53850

Add `BatchScanRegions` interface for pd-client.

Signed-off-by: you06 <you1474600@gmail.com>

Co-authored-by: JmPotato <github@ipotato.me>
2024-06-20 11:50:49 +00:00
ShuNing 43e9492ceb
pkg/statistics: reduce the memory alloc for hot statistics (#8208)
ref tikv/pd#7897, close tikv/pd#8207

pkg/statistics: reduce the memory alloc for hot statistics

Signed-off-by: nolouch <nolouch@gmail.com>
2024-05-22 02:37:16 +00:00
Ryan Leung 5cdf2526e7
*: update dependencies (#8112)
ref tikv/pd#4399

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-04-22 08:48:09 +00:00
Ryan Leung 7e18a69734
*: improve the linter and fix some bugs (#8015)
close tikv/pd#8019

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2024-04-11 09:00:22 +00:00