[close #497] let JVM ClassLoader load gRPC error related classes during warmup#496
Merged
marsishandsome merged 1 commit intotikv:masterfrom Jan 25, 2022
Merged
Conversation
Collaborator
Author
|
/run-all-tests |
7b447bf to
b06dd32
Compare
Collaborator
Author
|
/run-all-tests |
Collaborator
Author
sure. |
zz-jason
reviewed
Jan 25, 2022
| // let JVM ClassLoader load gRPC error related classes | ||
| // this operation may cost 100ms | ||
| Errorpb.Error.newBuilder() | ||
| .setNotLeader(Errorpb.NotLeader.newBuilder().build()) |
Member
There was a problem hiding this comment.
do we need to warm up other errors?
Collaborator
Author
There was a problem hiding this comment.
All the classes (include other errors) in org.tikv.kvproto.Errorpb will be loaded during warmup.
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
b06dd32 to
231b039
Compare
Collaborator
Author
|
/run-all-tests |
1 similar comment
Collaborator
Author
|
/run-all-tests |
ti-srebot
pushed a commit
to ti-srebot/client-java
that referenced
this pull request
Jan 25, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Collaborator
|
cherry pick to release-3.1 in PR #498 |
marsishandsome
pushed a commit
that referenced
this pull request
Jan 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: marsishandsome marsishandsome@gmail.com
What problem does this PR solve?
close #497
Problem Description: Request timeout when receiving NOT_LEADER error the first time.
What is changed and how it works?
The reason is that error.toString will trigger JVM ClassLoader load grpc error related classes, which costs more than 100ms.
Solution: let JVM JVM ClassLoader load grpc error related classes during warmup.