Skip to content

Commit

Permalink
HBASE-23376 NPE happens while replica region is moving (#906)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
ddupg authored and Apache9 committed Dec 19, 2019
1 parent 80ba354 commit 270eb98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private boolean isEqual(RegionLocations locs1, RegionLocations locs2) {
// 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) {
Expand Down

0 comments on commit 270eb98

Please sign in to comment.