Feature Request
Describe your feature request related problem
The existing pd-ctl service-gc-safepoint command only exposes the legacy NullKeyspace/unified-GC view. When keyspace-level GC is enabled, each keyspace has independent GC state and GC barriers, but pd-ctl provides no way to inspect them for a specific keyspace or across all keyspaces.
This makes it difficult to troubleshoot why GC is blocked and which barrier is responsible. This is a focused follow-up to the unfinished gc-state pd-ctl subtask in #8978.
Describe the feature you'd like
Add a read-only gc-state command to pd-ctl that can show the GC state for:
- A specified keyspace.
- All keyspaces.
The output should include the relevant GC safe points and GC barriers so that operators can identify what is blocking GC.
Describe alternatives you've considered
Operators can call GetGCState or GetAllKeyspacesGCStates directly, but doing so is less convenient for operational troubleshooting.
Extending service-gc-safepoint was also considered, but that command represents the legacy service safe point and NullKeyspace semantics. A new gc-state command better matches the current GC state and GC barrier model.
Teachability, Documentation, Adoption, Migration Strategy
Document gc-state as the read-only troubleshooting command for inspecting per-keyspace and cluster-wide GC states. Keep the existing service-gc-safepoint command unchanged for backward compatibility.
Feature Request
Describe your feature request related problem
The existing
pd-ctl service-gc-safepointcommand only exposes the legacy NullKeyspace/unified-GC view. When keyspace-level GC is enabled, each keyspace has independent GC state and GC barriers, butpd-ctlprovides no way to inspect them for a specific keyspace or across all keyspaces.This makes it difficult to troubleshoot why GC is blocked and which barrier is responsible. This is a focused follow-up to the unfinished
gc-statepd-ctl subtask in #8978.Describe the feature you'd like
Add a read-only
gc-statecommand topd-ctlthat can show the GC state for:The output should include the relevant GC safe points and GC barriers so that operators can identify what is blocking GC.
Describe alternatives you've considered
Operators can call
GetGCStateorGetAllKeyspacesGCStatesdirectly, but doing so is less convenient for operational troubleshooting.Extending
service-gc-safepointwas also considered, but that command represents the legacy service safe point and NullKeyspace semantics. A newgc-statecommand better matches the current GC state and GC barrier model.Teachability, Documentation, Adoption, Migration Strategy
Document
gc-stateas the read-only troubleshooting command for inspecting per-keyspace and cluster-wide GC states. Keep the existingservice-gc-safepointcommand unchanged for backward compatibility.