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

pd: RawKV GC SafePoint API #908

Merged
merged 8 commits into from
May 6, 2022
Merged

Conversation

AmoebaProtozoa
Copy link
Contributor

@AmoebaProtozoa AmoebaProtozoa commented Apr 25, 2022

As described by tikv/rfcs#90

Added 5 new RPC services as well as their corresponding messages related to RawKV GC

@AmoebaProtozoa AmoebaProtozoa added the status/WIP Status: Working in progress label Apr 25, 2022
@CLAassistant
Copy link

CLAassistant commented Apr 25, 2022

CLA assistant check
All committers have signed the CLA.

@AmoebaProtozoa AmoebaProtozoa changed the title [WIP] PD GC SafePoint API [WIP] pd: RawKV GC SafePoint API Apr 27, 2022
@AmoebaProtozoa AmoebaProtozoa removed the status/WIP Status: Working in progress label Apr 28, 2022
@AmoebaProtozoa AmoebaProtozoa changed the title [WIP] pd: RawKV GC SafePoint API pd: RawKV GC SafePoint API Apr 28, 2022
@AmoebaProtozoa AmoebaProtozoa marked this pull request as ready for review April 28, 2022 05:44
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated Show resolved Hide resolved
Copy link
Contributor

@pingyu pingyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@pingyu
Copy link
Contributor

pingyu commented Apr 29, 2022

@nolouch @MyonKeminta @TonsnakeLin PTAL, thanks ~

proto/pdpb.proto Outdated Show resolved Hide resolved
proto/pdpb.proto Outdated
@@ -67,12 +67,6 @@ service PD {

rpc ScatterRegion(ScatterRegionRequest) returns (ScatterRegionResponse) {}

rpc GetGCSafePoint(GetGCSafePointRequest) returns (GetGCSafePointResponse) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there compatibility issues with existing interfaces being removed? It is recommended to test it, otherwise it needs to be reserved as a Deprecated interface first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, So how about keeping the old GC apis in pdpb (until we decide to phase it out), adding only the new ones to a separate gcpb?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
proto/gcpb.proto Outdated
}

message GetAllServiceGroupsRequest {
pdpb.RequestHeader header = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would better to be independent to PD's RequestHeader & ResponseHeader:

  1. To make GC service possible to be totally independent to PD (e.g, a standalone micro service in Cloud).
  2. Define error type of PD & GC service together seems not reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the same separation be done on PD side?
Say, move gc methods outside grpc_service.go? And use separate type GcServer to provide gc functionalities instead of GrpcServer? https://github.com/tikv/pd/blob/6ab2e4448c331de6dbedb61dbec5113e1a2a4122/server/grpc_service.go#L72
What about client? Is a separate gc client needed along side PD client?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes, and we can try. Unless it is too expensive to do so. @nolouch How do you think ?

Copy link
Member

@nolouch nolouch May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, PD client may include gc client first?
for the header, may define a more general header? it can be used in PD(replace the old), also can use to gc service.

Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
@pingyu
Copy link
Contributor

pingyu commented May 6, 2022

LGTM~

@nolouch nolouch merged commit 55094d9 into pingcap:master May 6, 2022
@AmoebaProtozoa AmoebaProtozoa deleted the PD_GC_API branch May 6, 2022 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants