-
Notifications
You must be signed in to change notification settings - Fork 753
server, client: Deprecate old GC related APIs #9292
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
Conversation
|
Skipping CI for Draft Pull Request. |
… keyspace is configured (#9468) close #8978 client: Remove public v2 client and redirect call to v2 internally if keyspace is configured Removes the GC V2 related public APIs from PD client to avoid being used by new code. This is a temporary approach, and #9292 will give a complete deprecation. Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
22756d8 to
579bbb5
Compare
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
|
/test all |
|
/retest |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
|
/test all |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
|
/retest |
2 similar comments
|
/retest |
|
/retest |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
|
/retest |
|
/retest |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
| Header: wrapHeader(), | ||
| GcSafePoints: gcSafePoints, | ||
| Revision: revision, | ||
| Revision: 0, |
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.
Is the revision not used anymore?
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.
Actually I don't know when it's useful, but now this API cannot provide this field anymore.
cc @ystaticy do you know the purpose of this field?
|
/retest |
1 similar comment
|
/retest |
| storage := h.svr.GetStorage() | ||
| gcSafepoint, err := storage.LoadGCSafePoint() | ||
| gcStateManager := h.svr.GetGCStateManager() | ||
| gcState, err := gcStateManager.GetGCState(constant.NullKeyspaceID) |
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.
Do we have some way to get the Barriers for some keyspace using HTTP API? Or is it 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.
From a long-term perspective, it's needed, but we haven't done it yet. It should also be integrated into the pd-ctl (see our design document).
Currently, the old service safe point API still works for compatibility, but only for non-keyspace deployment, and does not include gc_worker's service safe point.
|
@tiancaiamao: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn 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-sigs/prow repository. |
rleungx
left a comment
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.
The rest LGTM
| re.Equal("Failed to delete service GC safepoint: request pd http api failed with status: '500 Internal Server Error', body: '\"cannot remove service safe point of gc_worker\"'\n", string(output)) | ||
| // This should be rejected previously, but as GC barrier became the replacement of services safe points and we no | ||
| // longer require the service safe point of "gc_worker", the deletion is now still allowed. | ||
| // re.Equal("Failed to delete service GC safepoint: request pd http api failed with status: '500 Internal Server Error', body: '\"cannot remove service safe point of gc_worker\"'\n", string(output)) |
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 just remove it?
|
|
||
| // Service safepoint must have a non-empty ID | ||
| _, err = s.client.UpdateServiceGCSafePoint(context.Background(), | ||
| //nolint:staticcheck |
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.
There are so many comments to disable the lint...
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.
The lint complains about marking it deprecated while keeping it covered by tests 😰
How about wrap it in a closure so that the nolint directive can be limit in fewer places?
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, rleungx, tiancaiamao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, rleungx, tiancaiamao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
… keyspace is configured (tikv#9468) close tikv#8978 client: Remove public v2 client and redirect call to v2 internally if keyspace is configured Removes the GC V2 related public APIs from PD client to avoid being used by new code. This is a temporary approach, and tikv#9292 will give a complete deprecation. Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: okjiang <819421878@qq.com>
close tikv#8978 This PR migrates the old GC APIs to the new implementation, and marks them as deprecated. Also suppresses warnings on necessary invocations to them, such as tests. Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com> Signed-off-by: okjiang <819421878@qq.com>
What problem does this PR solve?
Issue Number: Close #8978
What is changed and how does it work?
Check List
Tests
Code changes
-
Side effects
Related changes
pingcap/docs/pingcap/docs-cn:pingcap/tiup:Release note