tikv / tikv/pd

Implement WatchGCStates API

Open
#10,497 0 comments 0 reactions 0 assignees View on GitHub
type/development
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Development Task

Previously in GC API refactor project (#8978), the watching API was considered in low priority and not supported right away. Now as starter/essential is going to change its PD branch from `pd-cse` to this upstream repo, and these clusters can have too many keyspaces in a single physical cluster, TiKV polling `GetAllKeyspacesGCStates` is ineffective. Therefore a watching API is needed.

In pd-cse, there's a `WatchGCSafePointV2` API, but was removed in the refactor project, as it's not used by versions other than serverless and cannot be easily implemented based on the current architector of GC's code. Now as there's such a migrating plan, it becomes necessary too for smooth upgrading.

So we need:

* Implement `WatchGCStates` API
* Implement a compatible wrapper over `WatchGCStates` to provide a `WatchGCSafePointsV2` API.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing GetAllKeyspacesGCStates API and the current GC API refactor implementation. Compare the pd-cse WatchGCSafePointV2 behavior, then define and implement WatchGCStates plus a compatible WatchGCSafePointsV2 wrapper; done means both watching APIs support the migration requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.