Skip to content

Commit

Permalink
HBASE-25276 Need to throw the original exception in HRegion#openHRegi…
Browse files Browse the repository at this point in the history
…on (#2648)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
  • Loading branch information
nyl3532016 authored Nov 12, 2020
1 parent 57d9cae commit 0b6d6fd
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8137,11 +8137,16 @@ protected HRegion openHRegion(final CancelableProgressable reporter)
RegionReplicaUtil.isDefaultReplica(getRegionInfo())) {
writeRegionOpenMarker(wal, openSeqNum);
}
} catch(Throwable t) {
} catch (Throwable t) {
// By coprocessor path wrong region will open failed,
// MetricsRegionWrapperImpl is already init and not close,
// add region close when open failed
this.close();
try {
this.close();
} catch (Throwable e) {
LOG.warn("Open region: {} failed. Try close region but got exception ", this.getRegionInfo(),
e);
}
throw t;
}
return this;
Expand Down

0 comments on commit 0b6d6fd

Please sign in to comment.