Skip to content

Commit

Permalink
HBASE-26590 Hbase-client Meta lookup performance regression between h…
Browse files Browse the repository at this point in the history
…base-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 <[email protected]>
  • Loading branch information
huaxiangsun authored Jan 6, 2022
1 parent 76bc412 commit a6b0e2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a6b0e2d

Please sign in to comment.