HBASE-10662 RegionScanner is never closed if the region has been moved-out or re-opened when performing scan request
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1574743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78b7dad2c8
commit
fc9407f3a3
|
@ -3235,7 +3235,14 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
|
||||||
return builder.build();
|
return builder.build();
|
||||||
} catch (IOException ie) {
|
} catch (IOException ie) {
|
||||||
if (scannerName != null && ie instanceof NotServingRegionException) {
|
if (scannerName != null && ie instanceof NotServingRegionException) {
|
||||||
scanners.remove(scannerName);
|
RegionScannerHolder rsh = scanners.remove(scannerName);
|
||||||
|
if (rsh != null) {
|
||||||
|
try {
|
||||||
|
RegionScanner scanner = rsh.s;
|
||||||
|
scanner.close();
|
||||||
|
leases.cancelLease(scannerName);
|
||||||
|
} catch (IOException e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw new ServiceException(ie);
|
throw new ServiceException(ie);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue