HBASE-2927 BaseScanner gets stale HRegionInfo in some race cases
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@986887 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
625a079b73
commit
0e481c64e8
|
@ -479,6 +479,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2919 initTableReducerJob: Unused method parameter
|
HBASE-2919 initTableReducerJob: Unused method parameter
|
||||||
(Libor Dener via Stack)
|
(Libor Dener via Stack)
|
||||||
HBASE-2923 Deadlock between HRegion.internalFlushCache and close
|
HBASE-2923 Deadlock between HRegion.internalFlushCache and close
|
||||||
|
HBASE-2927 BaseScanner gets stale HRegionInfo in some race cases
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -538,7 +538,7 @@ abstract class BaseScanner extends Chore {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
protected void checkAssigned(final HRegionInterface regionServer,
|
protected void checkAssigned(final HRegionInterface regionServer,
|
||||||
final MetaRegion meta, final HRegionInfo info,
|
final MetaRegion meta, HRegionInfo info,
|
||||||
final String hostnameAndPort, final long startCode, boolean checkTwice)
|
final String hostnameAndPort, final long startCode, boolean checkTwice)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
boolean tryAgain = false;
|
boolean tryAgain = false;
|
||||||
|
@ -555,6 +555,7 @@ abstract class BaseScanner extends Chore {
|
||||||
if (r != null && !r.isEmpty()) {
|
if (r != null && !r.isEmpty()) {
|
||||||
sa = getServerAddress(r);
|
sa = getServerAddress(r);
|
||||||
sc = getStartCode(r);
|
sc = getStartCode(r);
|
||||||
|
info = master.getHRegionInfo(r.getRow(), r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sa != null && sa.length() > 0) {
|
if (sa != null && sa.length() > 0) {
|
||||||
|
@ -566,7 +567,7 @@ abstract class BaseScanner extends Chore {
|
||||||
* a dead server. Regions that were on a dead server will get reassigned
|
* a dead server. Regions that were on a dead server will get reassigned
|
||||||
* by ProcessServerShutdown
|
* by ProcessServerShutdown
|
||||||
*/
|
*/
|
||||||
if (info.isOffline() ||
|
if (info == null || info.isOffline() ||
|
||||||
this.master.getRegionManager().regionIsInTransition(info.getRegionNameAsString()) ||
|
this.master.getRegionManager().regionIsInTransition(info.getRegionNameAsString()) ||
|
||||||
(serverName != null && this.master.getServerManager().isDead(serverName))) {
|
(serverName != null && this.master.getServerManager().isDead(serverName))) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue