-
Notifications
You must be signed in to change notification settings - Fork 726
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
server, endpoint, client: Add PD APIs for RawKV GC Worker #4866
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
6556954
to
c5944e3
Compare
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
3160a94
to
fd07049
Compare
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
Signed-off-by: AmoebaProtozoa <[email protected]>
@@ -178,11 +194,149 @@ func (se *StorageEndpoint) SaveServiceGCSafePoint(ssp *ServiceSafePoint) error { | |||
return se.Save(key, string(value)) | |||
} | |||
|
|||
// RemoveServiceGCSafePoint removes a GC safepoint for the service | |||
// RemoveServiceGCSafePoint removes a GC safeoint for the service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Signed-off-by: AmoebaProtozoa <[email protected]>
server/storage/endpoint/key_path.go
Outdated
// gcSafePointPathByServiceGroup returns the path of the gc_worker's safe point | ||
// /gc_servicegroup/gc_safepoint/$service_group_id | ||
func gcSafePointPathByServiceGroup(serviceGroupID string) string { | ||
return path.Join(gcServiceGroupPath, "gc_safepoint", serviceGroupID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest to define the path including gc_safepoint
service_safepoint
as const.
…_path.go Signed-off-by: AmoebaProtozoa <[email protected]>
client/client.go
Outdated
c.ScheduleCheckLeader() | ||
return false, 0, errors.WithStack(err) | ||
} | ||
// if requested safepoint is the new safepoint, then update succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if requested safepoint is the new safepoint, then update succeeded | |
// If requested safepoint is the new safepoint, then update succeeded |
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
@haojinming: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Signed-off-by: pingyu <[email protected]>
/cc @nolouch @MyonKeminta |
@pingyu: GitHub didn't allow me to request PR reviews from the following users: MyonKeminta. Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
PTAL, thanks~ |
PTAL @AndreMouche |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split your PR to small parts to help review?
@@ -130,6 +131,22 @@ type Client interface { | |||
UpdateOption(option DynamicOption, value interface{}) error | |||
// Close closes the client. | |||
Close() | |||
|
|||
// GetGCAllServiceGroups returns a list containing all service groups that has safe point in pd | |||
GetGCAllServiceGroups(ctx context.Context) ([]string, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to define independently and then nested in here;
OK~ |
Here is the storage part. PTAL, thanks~ |
@AmoebaProtozoa: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What problem does this PR solve?
Issue Number: ref #4865
RFC: tikv/rfcs#90
What is changed and how does it work?
Check List
Tests
Related changes
ToDo:
Release note