-
Notifications
You must be signed in to change notification settings - Fork 220
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
Add PD API to support setting limit to GC safepoint #596
Conversation
proto/pdpb.proto
Outdated
// UUID v4 | ||
bytes uuid = 2; |
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.
I thought you want to change id
(with the form of "servicename/uuid")?
proto/pdpb.proto
Outdated
message GetGCSafePointLimitResponse { | ||
RequestHeader header = 1; | ||
uint64 safe_point = 2; | ||
uint64 min_safe_point_limit = 3; |
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.
Why not extend the GetGCSafePointResponse
instead?
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.
Oh, sorry. I misunderstood the document here.
PTAL @shafreeck |
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
message SetGCSafePointLimitRequest { | ||
RequestHeader header = 1; | ||
// service_name/uuid_v4 | ||
bytes id = 2; |
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.
How about adding the id
and ttl
field in the UpdateGCSafepoint
method, then it is not necessary to add a new method.
@@ -498,6 +500,7 @@ message GetGCSafePointResponse { | |||
ResponseHeader header = 1; | |||
|
|||
uint64 safe_point = 2; | |||
uint64 min_safe_point_limit = 3; |
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.
I think the returned safe_point
is always the minimum value, so min_safe_point_limit
is not necessary.
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.
TiDB need to check how far it can advance the safepoint before it actually advance it, because it need to do DeleteRange
step with the limited safepoint before sending its safepoint to PD.
Use #603 instead. Closed. |
Support getting and setting limit to GC safepoint, which makes it possible for other services to block GC.