Skip to content

Commit

Permalink
fix GC desc
Browse files Browse the repository at this point in the history
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
  • Loading branch information
ystaticy committed May 15, 2024
1 parent 45c7c87 commit 7b29bba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/design/2022-12-06-Keyspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ If "keyspace-name" is set when executing the Lightning command, it will encode k
- Indicates that the keyspace will advance its own GC safe point.
- Keyspace GC-related data: min start ts, GC safe point, service safe point, stored in own etcd path of each keyspace in PD.

Previously there was only one GCWorker leader for GC in the whole PD & TiKV cluster. After supporting keyspace level GC, for keyspace, the default GC management type is global GC. Or you can specify the GC management type as `global_gc` or `keyspace_level_gc` via keyspace meta's config `gc_management_type`. In keyspace level GC each keyspace has its own GCWorker leader that can separately advance its own GC safe point, safe point information stored in PD, It is also isolated by keyspace prefix, and only cleans the data below its keyspace range, without affecting each other.
Previously there was only one GCWorker leader for GC in the whole PD & TiKV cluster. After supporting keyspace level GC, for keyspace, the default GC management type is global GC. Or you can specify the GC management type as `global_gc` or `keyspace_level_gc` via keyspace meta's config `gc_management_type`.

When a specified keyspace uses the global gc: This keyspace will have its own GCworker leader, but this GCworker leader is not responsible for calculating GC safe point and resolve locks. This keyspace will rely on the GC safe point produced by the GCworker leader of TiDB with no keyspace set in the cluster for GC, and use its own GCworker leader for delete range.

When a specified keyspace uses the keyspace level GC: This keyspace will have its own GCworker leader and compute its own GC safe point, resolve locks, and delete ranges. The keyspace level safe point information stored in PD, It is also isolated by keyspace prefix, and only GC the data below its keyspace range, without affecting other keyspaces.

### TiKV

Expand Down

0 comments on commit 7b29bba

Please sign in to comment.