[
https://issues.apache.org/jira/browse/HBASE-5927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jieshan Bean updated HBASE-5927:
--------------------------------
Description:
A possible exception: If the related regionserver was just killed(But HMaster
has not perceived that), then we will get a local exception "Connection reset
by peer". If this region belongs to a disabling table. what will happen?
ServerShutdownHandler will remove this region from AM#regions. So this region
is still existing in RIT. TimeoutMonitor will take care of it after it got
timeout. Then invoke unassign again. Since this region has been removed from
AM#regions, it will return directly due to the below code:
synchronized (this.regions) {
// Check if this region is currently assigned
if (!regions.containsKey(region)) {
LOG.debug("Attempted to unassign region " +
region.getRegionNameAsString() + " but it is not " +
"currently assigned anywhere");
return;
}
}
Then it leads to an end-less loop.
was:
A possible exception: If the related regionserver was just killed(But HMaster
has not perceived that), then we will get a local exception "Connection reset
by peer". If this region belongs to a disabling table. what will happen?
ServerShutdownHandler will remove this region from AM#regions. So this region
is still existing in RIT. TimeoutMonitor will take care of it after it got
timeout. Then invoke unassign again. But it has been removed from AM#regions,
so it will return directly due to the below code:
public void unassign(HRegionInfo region, boolean force) {
// TODO: Method needs refactoring. Ugly buried returns throughout. Beware!
LOG.debug("Starting unassignment of region " +
region.getRegionNameAsString() + " (offlining)");
synchronized (this.regions) {
// Check if this region is currently assigned
if (!regions.containsKey(region)) {
LOG.debug("Attempted to unassign region " +
region.getRegionNameAsString() + " but it is not " +
"currently assigned anywhere");
return;
}
}
Then it leads to an end-less loop.
> AM#unassign should handle local exceptions after calling sendRegionClose
> ------------------------------------------------------------------------
>
> Key: HBASE-5927
> URL: https://issues.apache.org/jira/browse/HBASE-5927
> Project: HBase
> Issue Type: Bug
> Components: master
> Affects Versions: 0.92.1, 0.96.0, 0.94.1
> Reporter: Jieshan Bean
> Assignee: Jieshan Bean
> Fix For: 0.92.2, 0.96.0, 0.94.1
>
>
> A possible exception: If the related regionserver was just killed(But HMaster
> has not perceived that), then we will get a local exception "Connection reset
> by peer". If this region belongs to a disabling table. what will happen?
> ServerShutdownHandler will remove this region from AM#regions. So this region
> is still existing in RIT. TimeoutMonitor will take care of it after it got
> timeout. Then invoke unassign again. Since this region has been removed from
> AM#regions, it will return directly due to the below code:
> synchronized (this.regions) {
> // Check if this region is currently assigned
> if (!regions.containsKey(region)) {
> LOG.debug("Attempted to unassign region " +
> region.getRegionNameAsString() + " but it is not " +
> "currently assigned anywhere");
> return;
> }
> }
> Then it leads to an end-less loop.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira