Commit Graph

23 Commits

Author SHA1 Message Date
MyonKeminta 6d44caf9c2
gc_state_manager: Make GetAllKeyspacesGCStates able to batch and reuse results for better performance when called frequently (#9734)
ref tikv/pd#8978, closes tikv/pd#9724

Make `GetAllKeyspacesGCStates` able to be batched (allowing multiple calls merged to a single call and share the result).
A helper type `OrderedSingleFlight` is added to utils.

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2025-09-23 04:53:34 +00:00
tiancaiamao 7d93890a99
gc: global GC barriers support (#9340)
ref tikv/pd#8978

Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2025-08-05 04:07:39 +00:00
tiancaiamao 39c748d38a
pkg/gc: use lock to protect GetGCStates() (#9610)
ref tikv/pd#8978

Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2025-08-04 13:11:42 +00:00
Ryan Leung a37367fbc9
mcs: refactor election member interface (part 1) (#9599)
ref tikv/pd#5766

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-07-31 08:01:34 +00:00
MyonKeminta 0d311729ad
server, client: Deprecate old GC related APIs (#9292)
close tikv/pd#8978

This PR migrates the old GC APIs to the new implementation, and marks them as deprecated.
Also suppresses warnings on necessary invocations to them, such as tests.

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2025-07-24 04:11:01 +00:00
lhy1024 4bddd64401
*: enable errcheck in test (#9505)
ref tikv/pd#4322

Signed-off-by: lhy1024 <admin@liudos.us>
2025-07-10 09:53:00 +00:00
Ryan Leung 5ae4a7e9be
*: add leak check to the main package (#8043)
ref tikv/pd#7782

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-07-07 07:58:54 +00:00
lhy1024 3eebb75ea0
*: move some keyspace constant (#9444)
ref tikv/pd#9414

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

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-06-26 09:21:03 +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
tiancaiamao 2fb2fce0c5
gc: make GetAllKeyspacesGCStates() ignore non-active keyspaces (#9250)
ref tikv/pd#8978

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2025-05-14 10:04:09 +00:00
MyonKeminta caf9fce58d
gc: Implement compatibility methods and `GetAllKeyspacesGCStates` method to `GCStateManager` (#9134)
ref tikv/pd#8978

Implement compatibility methods and `GetAllKeyspacesGCStates` method to `GCStateManager`, which is planned to be the replacement of `SafePointManager`.

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-04-15 09:32:18 +00:00
Ping Yu 5b6d489f15
keyspace: Asynchronously pre-allocate keyspaces (#9019)
close tikv/pd#9022

keyspace: Asynchronously pre-allocate keyspaces to improve startup performance (mainly for test).

Signed-off-by: Ping Yu <yuping@pingcap.com>
2025-04-08 09:31:07 +00:00
MyonKeminta 9092ccc686
gc: Add `GCStateManager` which is planned to be the replacement of `SafePointManager` (#9169)
ref tikv/pd#8978

Add `GCStateManager` which is planned to be the replacement of `SafePointManager`.

This is part of the refactor task #8978 . The new module is not yet used until the next PR updates the gRPC service interfaces.

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-04-08 05:58:49 +00:00
Ryan Leung 093b84112e
*: check file header (#9015)
ref tikv/pd#4322

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2025-01-21 03:35:17 +00:00
Ryan Leung 221877d424
*: unify the error definition (#8902)
ref tikv/pd#8922

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-12-18 08:50:51 +00:00
Ryan Leung e907aac6fc
*: enable gci (#8925)
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>
2024-12-17 07:23:16 +00:00
Ryan Leung 14748648c7
*: enable more linters (#8742)
ref tikv/pd#4399

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-10-25 04:07:38 +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
lhy1024 a7663514c5
*: fix some typos (#8544)
ref tikv/pd#4399

Signed-off-by: lhy1024 <admin@liudos.us>
2024-08-19 09:55:41 +00:00
Ryan Leung d031342b4e
mcs: improve scheduling service log (#7060)
ref tikv/pd#5839

Signed-off-by: Ryan Leung <rleungx@gmail.com>
2023-09-08 09:09:06 +00:00
Ryan Leung 85d3a0cddf
*: cherry pick some keyspace related things (#6840)
ref tikv/pd#4399

Signed-off-by: disksing <i@disksing.com>
Signed-off-by: Evan Zhou <coocood@gmail.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: disksing <i@disksing.com>
Co-authored-by: Evan Zhou <coocood@gmail.com>
Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
2023-07-31 07:44:37 +00:00
ystaticy 7ac9e6be3a
support block update gc v1 safe point (#6848)
ref tikv/pd#6849

Signed-off-by: ystaticy <y_static_y@sina.com>
2023-07-27 06:16:35 +00:00
ystaticy ccb0bba4e1
Introduce keyspace safepoint interface (#6419)
ref tikv/pd#6487

Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>

Co-authored-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
2023-05-25 06:29:39 +00:00