Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC: Support TiDB server with different keyspace to advance GC safe point separately #51593

Open
1 of 2 tasks
ystaticy opened this issue Mar 7, 2024 · 0 comments
Open
1 of 2 tasks
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@ystaticy
Copy link
Contributor

ystaticy commented Mar 7, 2024

Enhancement

Support TiDB with different keyspace to advance gc separately.

Background

TiDB already supports deploying multiple clusters with different keyspaces on a single PD TiKV cluster.

Previously, we have implemented multiple TiDB clusters with a single TiDB GC Worker that does not configure Keyspace to advance the global GC safe point. Each keyspace TiDB only depends on the global GC safepoint. Do your own deleteRange cleanup.

The PR #51300 Implement that the keyspace TiDB cluster can advance the GC safe point of the current Keyspace in the Keyspace dimension by itself after enabling keyspace level GC. In this way, the GC safe points between keyspaces are separated, so that if one Keyspace GC safe point is advancing slowly, it can not affect the GC safe points of other keyspaces.

Implementation

  1. If the keyspace-name is not configured in TiDB, nothing will be changed.
  2. If the keyspace meta doesn't configure keyspace level GC, it will still use the global GC, nothing will be changed.
  3. The following storage and GC and safe point ETCD keys are distinguished by keyspace:
  • Minstartts
  • Saved safe point
  • GC safe point
  • Service safe point
  1. One limitation: If either TiDB with keyspace sets keyspace level GC, then this keyspace cannot be returned global GC.

Related Tasks

TiDB Server support keyspace level GC

TiDB BR,Lightning,Dumpling,CDC implementation

PD interface implementation

@ystaticy ystaticy added the type/enhancement The issue or PR belongs to an enhancement. label Mar 7, 2024
@ystaticy ystaticy changed the title Support TiDB with different keyspace to advance GC safe point separately GC: Support TiDB server with different keyspace to advance GC safe point separately Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant