Skip to content

pd: RawKV GC SafePoint API#908

Merged
nolouch merged 8 commits into
pingcap:masterfrom
AmoebaProtozoa:PD_GC_API
May 6, 2022
Merged

pd: RawKV GC SafePoint API#908
nolouch merged 8 commits into
pingcap:masterfrom
AmoebaProtozoa:PD_GC_API

Conversation

@AmoebaProtozoa

@AmoebaProtozoa AmoebaProtozoa commented Apr 25, 2022

Copy link
Copy Markdown
Contributor

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

CLAassistant commented Apr 25, 2022

Copy link
Copy Markdown

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
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto Outdated

@pingyu pingyu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM~

@pingyu

pingyu commented Apr 29, 2022

Copy link
Copy Markdown
Contributor

@nolouch @MyonKeminta @TonsnakeLin PTAL, thanks ~

Comment thread proto/pdpb.proto Outdated
Comment thread proto/pdpb.proto

rpc ScatterRegion(ScatterRegionRequest) returns (ScatterRegionResponse) {}

rpc GetGCSafePoint(GetGCSafePointRequest) returns (GetGCSafePointResponse) {}

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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>
Comment thread proto/gcpb.proto Outdated
}

message GetAllServiceGroupsRequest {
pdpb.RequestHeader header = 1;

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 ?

@nolouch nolouch May 5, 2022

Copy link
Copy Markdown
Member

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

pingyu commented May 6, 2022

Copy link
Copy Markdown
Contributor

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.

4 participants