From 270eb9886efd351d4346bb9de0f4fc3c17cf1910 Mon Sep 17 00:00:00 2001 From: XinSun Date: Thu, 19 Dec 2019 15:11:04 +0800 Subject: [PATCH] HBASE-23376 NPE happens while replica region is moving (#906) Signed-off-by: Duo Zhang --- .../apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0cdfcdd083c..d36ffea9b6e 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 @@ -237,7 +237,7 @@ class AsyncNonMetaRegionLocator { // which prevents us being added. The upper layer can use this value to complete pending requests. private RegionLocations addToCache(TableCache tableCache, RegionLocations locs) { LOG.trace("Try adding {} to cache", locs); - byte[] startKey = locs.getDefaultRegionLocation().getRegion().getStartKey(); + byte[] startKey = locs.getRegionLocation().getRegion().getStartKey(); for (;;) { RegionLocations oldLocs = tableCache.cache.putIfAbsent(startKey, locs); if (oldLocs == null) {