This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 0360d4738cb HBASE-29191 Use MetaRpcReadTimeout when accessing Meta 
replicas (#6802)
0360d4738cb is described below

commit 0360d4738cbfda05a059748303625a89ffec1a38
Author: YR <[email protected]>
AuthorDate: Fri Apr 11 21:34:50 2025 +0800

    HBASE-29191 Use MetaRpcReadTimeout when accessing Meta replicas (#6802)
    
    Signed-off-by: Duo Zhang <[email protected]>
    (cherry picked from commit 437b3130bf4d3bae261654bf3efe5ca42dbfb112)
---
 .../org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java     | 2 +-
 .../java/org/apache/hadoop/hbase/client/ConnectionImplementation.java | 2 +-
 .../hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java     | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
index 4c770dc914a..d97f0105878 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
@@ -234,7 +234,7 @@ class AsyncNonMetaRegionLocator {
             int numOfReplicas = 
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
             try {
               RegionLocations metaLocations = 
conn.registry.getMetaRegionLocations()
-                .get(conn.connConf.getReadRpcTimeoutNs(), 
TimeUnit.NANOSECONDS);
+                .get(conn.connConf.getMetaReadRpcTimeoutNs(), 
TimeUnit.NANOSECONDS);
               numOfReplicas = metaLocations.size();
             } catch (Exception e) {
               LOG.error("Failed to get table {}'s region replication, ", 
META_TABLE_NAME, e);
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 5e0cd51730b..28b26ba648b 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -411,7 +411,7 @@ public class ConnectionImplementation implements 
ClusterConnection, Closeable {
             int numOfReplicas = 1;
             try {
               RegionLocations metaLocations = 
this.registry.getMetaRegionLocations()
-                .get(connectionConfig.getReadRpcTimeout(), 
TimeUnit.MILLISECONDS);
+                .get(connectionConfig.getMetaReadRpcTimeout(), 
TimeUnit.MILLISECONDS);
               numOfReplicas = metaLocations.size();
             } catch (Exception e) {
               LOG.error("Failed to get table {}'s region replication, ", 
META_TABLE_NAME, e);
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
index 129216ce24c..f93bde9fd63 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
@@ -100,7 +100,7 @@ public class TestCatalogReplicaLoadBalanceSimpleSelector {
         int numOfReplicas = 
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
         try {
           RegionLocations metaLocations = 
CONN.registry.getMetaRegionLocations()
-            .get(CONN.connConf.getReadRpcTimeoutNs(), TimeUnit.NANOSECONDS);
+            .get(CONN.connConf.getMetaReadRpcTimeoutNs(), 
TimeUnit.NANOSECONDS);
           numOfReplicas = metaLocations.size();
         } catch (Exception e) {
           LOG.error("Failed to get table {}'s region replication, ", 
META_TABLE_NAME, e);
@@ -127,7 +127,7 @@ public class TestCatalogReplicaLoadBalanceSimpleSelector {
           int numOfReplicas = 
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
           try {
             RegionLocations metaLocations = 
CONN.registry.getMetaRegionLocations()
-              .get(CONN.connConf.getReadRpcTimeoutNs(), TimeUnit.NANOSECONDS);
+              .get(CONN.connConf.getMetaReadRpcTimeoutNs(), 
TimeUnit.NANOSECONDS);
             numOfReplicas = metaLocations.size();
           } catch (Exception e) {
             LOG.error("Failed to get table {}'s region replication, ", 
META_TABLE_NAME, e);

Reply via email to