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
HBASE-27652 Client-side lock contention around Configuration when using read replica regions #5036
HBASE-27652 Client-side lock contention around Configuration when using read replica regions #5036
Conversation
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.
Posting up a PR vs. branch-2. I didn't find RpcRetryingCallerFactory
on master
. I guess the master
patch will look quite different.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
Outdated
Show resolved
Hide resolved
@@ -71,30 +71,41 @@ public <T> RpcRetryingCaller<T> newCaller() { | |||
interceptor, startLogErrorsCnt, connectionConf.getRpcTimeout(), metrics); | |||
} | |||
|
|||
public static RpcRetryingCallerFactory instantiate(Configuration configuration, | |||
@RestrictedApi(explanation = "Should only be called on process initialization", link = "", |
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.
Avoid calling this method as much as is reasonable.
The HRegionServer
call site is particularly insidious. It is called from the HRegionServer
constructor and looks like this,
rpcRetryingCallerFactory = RpcRetryingCallerFactory.instantiate(this.conf,
clusterConnection == null ? null : clusterConnection.getConnectionMetrics());
I think that clusterConnection
is always null here, because clusterConnection
is instantiated in protected synchronized void setupClusterConnection()
, which, as far as I can tell, is only called from public void run()
.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
On master the whole sync client is built upon async client, so the retrying caller related classes are all removed. |
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.
Most code are just boiler plate as we add a parameter for the constructor.
Only one concern is about changing RpcRetryingCallerFactory to IA.LimitedPrivate, as I do not think we want users to customize it, otherwise we should have introduced an interface. I think the configuration is just for tests, just like we can also set the implementation class of HMaster and HRegionServer, but we not expect users to do this.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
Outdated
Show resolved
Hide resolved
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
Show resolved
Hide resolved
49358d4
to
3f219b2
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
3f219b2
to
34ed035
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…ng read replica regions
34ed035
to
37591b1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…iguration when using read replica regions (apache#5036) Signed-off-by: Duo Zhang <zhangduo@apache.org>
No description provided.