[
https://issues.apache.org/jira/browse/HBASE-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13633020#comment-13633020
]
ramkrishna.s.vasudevan commented on HBASE-8353:
-----------------------------------------------
{code}
boolean processRegionInTransitionAndBlockUntilAssigned(final HRegionInfo hri)
throws InterruptedException, KeeperException, IOException {
boolean intransistion =
processRegionInTransition(hri.getEncodedName(), hri, null);
if (!intransistion) return intransistion;
LOG.debug("Waiting on " + HRegionInfo.prettyPrint(hri.getEncodedName()));
synchronized(this.regionsInTransition) {
while (!this.master.isStopped() &&
this.regionsInTransition.containsKey(hri.getEncodedName())) {
// We expect a notify, but by security we set a timout
this.regionsInTransition.wait(100);
}
}
return intransistion;
{code}
Here if we see CatalogTables in CLOSING state and we can do the check for
serverManager.isServerOnline from the CLOSING znode data.origin and avoid
waiting and go for assignment.
Should it be ok?
> -ROOT-/.META. regions are hanging if master restarted while closing
> -ROOT-/.META. regions
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-8353
> URL: https://issues.apache.org/jira/browse/HBASE-8353
> Project: HBase
> Issue Type: Bug
> Components: Region Assignment
> Affects Versions: 0.94.6
> Reporter: rajeshbabu
> Assignee: rajeshbabu
> Priority: Critical
> Fix For: 0.94.7
>
>
> ROOT/META are not getting assigned if master restarted while closing
> ROOT/META.
> Lets suppose catalog table regions in M_ZK_REGION_CLOSING state during master
> initialization and then just we are adding the them to RIT and waiting for
> TM. {code}
> if (isOnDeadServer(regionInfo, deadServers) &&
> (data.getOrigin() == null ||
> !serverManager.isServerOnline(data.getOrigin()))) {
> // If was on dead server, its closed now. Force to OFFLINE and this
> // will get it reassigned if appropriate
> forceOffline(regionInfo, data);
> } else {
> // Just insert region into RIT.
> // If this never updates the timeout will trigger new assignment
> regionsInTransition.put(encodedRegionName, new RegionState(
> regionInfo, RegionState.State.CLOSING,
> data.getStamp(), data.getOrigin()));
> }
> {code}
> isOnDeadServer always return false to ROOT/META because deadServers is null.
> Even TM cannot close them properly because its not available in online
> regions since its not yet assigned.
> {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;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira