You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2011/07/01 07:01:28 UTC

[jira] [Commented] (HBASE-4052) Enabling a table after master switch is not allowing table scan. Throws NotServingRegionException

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

ramkrishna.s.vasudevan commented on HBASE-4052:
-----------------------------------------------

As per my analysis the problem is that,

When we do a remove all the online regions are closed.
In the Enable table flow 
{noformat}
  private List<HRegionInfo> regionsToAssign(final List<HRegionInfo> regionsInMeta)
  throws IOException {
    final List<HRegionInfo> onlineRegions =
      this.assignmentManager.getRegionsOfTable(tableName);
    regionsInMeta.removeAll(onlineRegions);
    return regionsInMeta;
  }
{noformat}
We remove the regions if it is already online.

But as per the bug, enable is called after switching,

So while the standby master becomes active, in the rebuildUserRegion api,
we add all the regions from the Meta and we dont check if it is already disabled.

So when the flow comes to enable (regionsToAssign()) we consider the region to be onlined already.  
Finally when we try to scan the table, we get NotServingRegionException.

Correct me if am wrong in my analysis.  


> Enabling a table after master switch is not allowing table scan.  Throws NotServingRegionException
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4052
>                 URL: https://issues.apache.org/jira/browse/HBASE-4052
>             Project: HBase
>          Issue Type: Bug
>         Environment: Linux
>            Reporter: ramkrishna.s.vasudevan
>
> Following is the scenario:
> Start RS and Active and standby masters
> Create table and insert data.
> Disable the table.
> Stop the active master and switch to the standby master.
> Now enable the table.
> Do a scan on the enabled table.
> NotServingRegionException is Thrown.
> But the same works well when we dont switch the master.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira