-
Notifications
You must be signed in to change notification settings - Fork 109
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
[close #497] let JVM ClassLoader load gRPC error related classes during warmup #496
[close #497] let JVM ClassLoader load gRPC error related classes during warmup #496
Conversation
/run-all-tests |
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.
could you add some test?
7b447bf
to
b06dd32
Compare
/run-all-tests |
sure. |
// let JVM ClassLoader load gRPC error related classes | ||
// this operation may cost 100ms | ||
Errorpb.Error.newBuilder() | ||
.setNotLeader(Errorpb.NotLeader.newBuilder().build()) |
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 need to warm up other errors?
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.
All the classes (include other errors) in org.tikv.kvproto.Errorpb
will be loaded during warmup.
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
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
b06dd32
to
231b039
Compare
/run-all-tests |
1 similar comment
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.1 in PR #498 |
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.