-
Notifications
You must be signed in to change notification settings - Fork 753
Closed
Labels
type/developmentThe issue belongs to a development tasksThe issue belongs to a development tasks
Description
Development Task
This is the majority part of the refactoring task pingcap/tidb#58720.
A set of new APIs for GC will be implemented which is expected to provide a more comprehensible semantics and recude potential misuses. This will also be the basis for implementing a planned feature name protected snapshots.
Subtasks
Note that protected snapshots won't be included in this phase and will be another separated work after finishing the refactoring.
- Add new RPC calls to kvproto Add new GC API pingcap/kvproto#1288
- Expose the if-then-else transaction interface of etcd to
kv.Baselayer, parallel to the existingkv.Base.RunInTxn. storage: expose etcd's transaction as LowLevelTxn interface to kv.Base #9016 - Add implementation new RPC interfaces. (may need to further breakdown into muitiple subtasks later)
- Basic API set.
- Including:
- AdvanceGCSafePoint
- AdvanceTxnSafePoint
- SetGCBarrier
- DeleteGCBarrier
- GetGCState
- GetGlobalGCState
- storage/endpoint layer storage/endpoint: Add a new component
GCStateStorageandGCStateProviderto storage/endpoints as the new storage layer for GC related metadata #9109 GCStateManagerlayer- gRPC layer server: Add gRPC interfaces for the new GC APIs. #9189
- Including:
- Global GC barriers support gc: global GC barriers support #9340
- Support controlling disabling physical GC operations on TiKV (required by BR, lower priority)
- Support watching global GC state changes (including all keyspaces; maybe required by keyspace-level-GC for running GC in TiKV, lower priority, necessary when the amount of keyspaces in a single cluster grows too high)
- Basic API set.
- Implement the new set of methods on
pd.Clientinterface type.- Basic API set client: Update PD Client interface and supports the new GC API #9203
- Global GC barriers support *: expose SetGlobalGCBarrier/DeleteGlobalGCBarrier API for pd client #9361
- Support controlling disabling physical GC operations on TiKV (lower priority)
- New pd-ctl commands
gc-statefor replacing the currentservice-gc-safepointcommand. - Mark the old API deprecated. server, client: Deprecate old GC related APIs #9292
- Make keyspace level GC enabled by default
Other fixes and improvements:
- gc: make GetAllKeyspacesGCStates() ignore non-active keyspaces #9250
- client: Add a helper function for determining whether a keyspace has keyspace level GC enabled #9429
- Use typed error in PD client for callers to determine the error reason
- gc_state_manager: Make GetAllKeyspacesGCStates able to batch and reuse results for better performance when called frequently #9734
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/developmentThe issue belongs to a development tasksThe issue belongs to a development tasks