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

Support actively requesting update health feedback information by calling RPC to TiKV #1287

Merged
merged 14 commits into from May 27, 2024

Conversation

MyonKeminta
Copy link
Contributor

@MyonKeminta MyonKeminta commented Apr 11, 2024

Tests will be added later. Let's see if this approach is acceptable now...

It seems possible to use the BatchCommandsEmptyRequest to do this, but as it's designed for test purpose, and there are some special handlings that I don't understand in client-go (such as CallRPC function in client-go directly returns an empty response for it without accessing TiKV), I think a better idea would be adding a new API, so I added a RequestHealthFeedback RPC call to TiKV. A drawback of this solution is that this might make it harder to include this to branch release-8.1...

Update: The new RPC request is finally named GetHealthFeedback and is now a complete API that supports to be used in both batched & non-batched mode. And it has a special behavior, which is how it's being made use of in current implementation: If it's called in batched RPC mode, the response batch (BatchCommandsResponse) will also carry the feedback info.

Ref: tikv/tikv#16297

Requires:

…ling RPC to TiKV

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>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
@MyonKeminta MyonKeminta marked this pull request as ready for review May 16, 2024 07:26
MyonKeminta and others added 6 commits May 16, 2024 15:26
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>
@MyonKeminta
Copy link
Contributor Author

MyonKeminta commented May 16, 2024

cc @crazycs520 PTAL
The integration test may fail due to TiKV image not updated to latest master. It should work tomorrow without building manually.

tikv/kv.go Show resolved Hide resolved
Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

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

LGTM

@MyonKeminta
Copy link
Contributor Author

@crazycs520 @zyguan PTAL

@cfzjywxk
Copy link
Contributor

/merge

@cfzjywxk cfzjywxk merged commit 31a8dda into tikv:master May 27, 2024
10 checks passed
@MyonKeminta MyonKeminta deleted the m/request-health-feedback branch May 27, 2024 08:01
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

3 participants