HBASE-21421 Do not kill RS if reportOnlineRegions fails
This commit is contained in:
parent
d19e6dff2c
commit
5b8c767374
|
@ -1007,8 +1007,7 @@ public class AssignmentManager implements ServerListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkOnlineRegionsReport(final ServerStateNode serverNode, final Set<byte[]> regionNames)
|
void checkOnlineRegionsReport(final ServerStateNode serverNode, final Set<byte[]> regionNames) {
|
||||||
throws YouAreDeadException {
|
|
||||||
final ServerName serverName = serverNode.getServerName();
|
final ServerName serverName = serverNode.getServerName();
|
||||||
try {
|
try {
|
||||||
for (byte[] regionName: regionNames) {
|
for (byte[] regionName: regionNames) {
|
||||||
|
@ -1047,9 +1046,10 @@ public class AssignmentManager implements ServerListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (UnexpectedStateException e) {
|
} catch (UnexpectedStateException e) {
|
||||||
LOG.warn("Killing " + serverName + ": " + e.getMessage());
|
//See HBASE-21421, we can count on reportRegionStateTransition calls
|
||||||
killRegionServer(serverName);
|
//We only log a warming here. It could be a network lag.
|
||||||
throw (YouAreDeadException)new YouAreDeadException(e.getMessage()).initCause(e);
|
LOG.warn("Failed to checkOnlineRegionsReport, maybe due to network lag, "
|
||||||
|
+ "if this message continues, be careful of double assign", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.ClassRule;
|
import org.junit.ClassRule;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
@ -137,7 +138,11 @@ public class TestRogueRSAssignment {
|
||||||
admin.setBalancerRunning(true, false);
|
admin.setBalancerRunning(true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ignore this test, see HBASE-21421
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore
|
||||||
public void testReportRSWithWrongRegion() throws Exception {
|
public void testReportRSWithWrongRegion() throws Exception {
|
||||||
final TableName tableName = TableName.valueOf(this.name.getMethodName());
|
final TableName tableName = TableName.valueOf(this.name.getMethodName());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue