-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
HADOOP-18143. toString method of RpcCall throws IllegalArgumentException #4030
base: trunk
Are you sure you want to change the base?
Conversation
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@@ -629,6 +630,7 @@ private RpcWritable call(RPC.Server server, | |||
// which uses the rpc header. in the normal case we want to defer decoding | |||
// the rpc header until needed by the rpc engine. | |||
static class RpcProtobufRequest extends RpcWritable.Buffer { | |||
private final ReentrantLock lock = new ReentrantLock(); |
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 guess re-entrant lock is unnecessary.
adding synchronized
to getRequestHeader()
method and calling this method instead of all direct usages of requestHeader
would be sufficient.
This would ensure that requestHeader
will never be null. So unnecessary null check can be removed.
Remember, this is a critical path, any extra performance impacts, however small it is would impact the overall RPC performance.
Description of PR
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?