[
https://issues.apache.org/jira/browse/HBASE-26590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461031#comment-17461031
]
Huaxiang Sun commented on HBASE-26590:
--------------------------------------
I debugged the code, found that this regression is caused by the following
line. It now asks region server to return 5 rows, which will take more time for
region server to process. This change was introduced in HBASE-20182, which in
most normal cases, the extra 4 rows returned are discarded. The proposed fix is
to revert back to the hbase-1 behavior, i.e, ask for 1 row in meta scan. For
the corner case fixed by HBASE-20182, it will go back to meta region server
couple more times for the correct location.
{code:java}
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 9145c55c0a..6039387b6e 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
@@ -888,7 +888,7 @@ class ConnectionImplementation implements
ClusterConnection, Closeable {
byte[] metaStopKey =
RegionInfo.createRegionName(tableName, HConstants.EMPTY_START_ROW, "",
false);
Scan s = new Scan().withStartRow(metaStartKey).withStopRow(metaStopKey,
true)
- .addFamily(HConstants.CATALOG_FAMILY).setReversed(true).setCaching(5)
+ .addFamily(HConstants.CATALOG_FAMILY).setReversed(true).setCaching(1)
.setReadType(ReadType.PREAD);
switch (this.metaReplicaMode) { {code}
> Hbase-client Meta lookup performance regression between hbase-1 and hbase-2
> ---------------------------------------------------------------------------
>
> Key: HBASE-26590
> URL: https://issues.apache.org/jira/browse/HBASE-26590
> Project: HBase
> Issue Type: Improvement
> Components: meta
> Affects Versions: 3.0.0-alpha-1, 2.3.7
> Reporter: Huaxiang Sun
> Assignee: Huaxiang Sun
> Priority: Major
>
> One of our users complained higher latency after application upgrades from
> hbase-1.2 client (CDH-5.16.2) to hbase-2.4.5 client with meta replica Load
> Balance mode during app restart. I reproduced the regression by a test for
> meta lookup.
> At my test cluster, there are 160k regions for the test table, so there are
> 160k entries in meta region. Used one thread to do 1 million meta lookup
> against the meta region server.
>
> ||Version ||Meta Replica Load Balance Enabled||Time ||
> ||2.4.5-with-fixed||Yes||336458ms||
> ||2.4.5-with-fixed||No||333253ms||
> ||2.4.5||Yes||469980ms||
> ||2.4.5||No||470515ms||
> | *cdh-5.16.2*| *No* | *323412ms*|
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)