From a6b0e2dc85f9cd754494a5158dfde975972515b0 Mon Sep 17 00:00:00 2001 From: huaxiangsun Date: Thu, 6 Jan 2022 11:54:53 -0800 Subject: [PATCH] HBASE-26590 Hbase-client Meta lookup performance regression between hbase-1 and hbase-2 (#4008) (#4011) Change scan caching back to 1 to avoid extra work at Region Server side. For most cases, the extra 4 results fetched are wasted at the client side. Signed-off-by: Duo Zhang --- .../apache/hadoop/hbase/client/ConnectionImplementation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 46863af86a16..5fec87ef4590 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 @@ -912,7 +912,7 @@ private RegionLocations locateRegionInMeta(TableName tableName, byte[] row, bool 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) {