hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rajeshbabu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8353) -ROOT-/.META. regions are hanging if master restarted while closing -ROOT-/.META. regions on dead RS
Date Thu, 18 Apr 2013 04:19:16 GMT

    [ https://issues.apache.org/jira/browse/HBASE-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634812#comment-13634812
] 

rajeshbabu commented on HBASE-8353:
-----------------------------------

[~jxiang]
{code}
if (isOnDeadServer(regionInfo, deadServers) ||
!serverManager.isServerOnline(data.getOrigin())) {
{code}

the condition always return true since origin is master which is never in online servers list
but it will be good if we change server in closing node to target server.

One more solution is :
 read servername from zk or ROOT table and if the server is not online then form dead servers
to pass it to processRegionInTransition
{code}
  boolean processRegionInTransitionAndBlockUntilAssigned(final HRegionInfo hri)
  throws InterruptedException, KeeperException, IOException {
    ServerName serverName =
        hri.isRootRegion() ? this.catalogTracker.getRootLocation()
            : hri.isMetaRegion() ? this.catalogTracker.getMetaLocationOrReadLocationFromRoot()
                : null;
    Map<ServerName,List<Pair<HRegionInfo,Result>>> deadServers = null;
    if (serverName != null && !serverManager.isServerOnline(serverName)) {
      List<Pair<HRegionInfo, Result>> offlineRegion = new ArrayList<Pair<HRegionInfo,
Result>>(1);
      offlineRegion.add(new Pair<HRegionInfo, Result>(hri, null));
      deadServers = new TreeMap<ServerName, List<Pair<HRegionInfo, Result>>>();
      deadServers.put(serverName, offlineRegion);
    }
    boolean intransistion =
      processRegionInTransition(hri.getEncodedName(), hri, deadServers);
{code}

What do you say about this?
                
> -ROOT-/.META. regions are hanging if master restarted while closing -ROOT-/.META. regions
on dead RS
> ----------------------------------------------------------------------------------------------------
>
>                 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
>             Fix For: 0.94.8
>
>         Attachments: HBASE-8353_94.patch
>
>
> 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

Mime
View raw message