HBASE-12319: Inconsistencies during region recovery due to close/open of a region during recovery

This commit is contained in:
Jeffrey Zhong 2014-11-03 21:31:12 -08:00
parent d4eb7d1bd1
commit c84b13514e
2 changed files with 2 additions and 2 deletions

View File

@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements
if (actualRegion == null) { // If already online, we still need to close it.
LOG.info("The opening previously in progress has been cancelled by a CLOSE request.");
// The master deletes the znode when it receives this exception.
throw new NotServingRegionException("The region " + encodedName +
throw new RegionAlreadyInTransitionException("The region " + encodedName +
" was opening but not yet served. Opening is cancelled.");
}
} else if (Boolean.FALSE.equals(previous)) {

View File

@ -402,7 +402,7 @@ public class TestRegionServerNoMaster {
getRS().rpcServices.closeRegion(null, crr);
Assert.assertTrue(false);
} catch (ServiceException expected) {
Assert.assertTrue(expected.getCause() instanceof NotServingRegionException);
Assert.assertTrue(expected.getCause() instanceof RegionAlreadyInTransitionException);
}
// The close should have left the ZK state as it is: it's the job the AM to delete it