You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2019/12/19 07:23:36 UTC

[hbase] branch branch-2.1 updated: HBASE-23376 NPE happens while replica region is moving (#906)

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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 4d0af4a  HBASE-23376 NPE happens while replica region is moving (#906)
4d0af4a is described below

commit 4d0af4a10f7983b0624db30af77d157fb90c8638
Author: XinSun <dd...@gmail.com>
AuthorDate: Thu Dec 19 15:11:04 2019 +0800

    HBASE-23376 NPE happens while replica region is moving (#906)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../java/org/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 3224292..85b3df3 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
@@ -230,7 +230,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) {