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

rajeshbabu commented on HBASE-6317:
-----------------------------------

@Jimmy
bq.why shouldn't we put them in the map if the table is disabled or enabling?
In case of disabled we are sure that all the regions of table are offline so we 
should not add to regionAssignments. May be we can add to region states with 
state as CLOSED.
In case of enabling adding ENABLING table regions to regionAssignments cause 
data loss(regions never assigned until master restarted).
Consider a scenario:-
1)Lets take a table T with regions A,B,C and after table creation A,B,C are in 
RS1.
2)now disabled table.(All regions are in offline as for META A,B,C are in RS1)
3)enable table and lets suppose its partially enabled.(A is in transition,B is 
assigned to RS2,C assignment not yet started)
4)now only master restarted(All region servers are in online)
5)during rebuildUserRegions if we add ENABLING table regions on onlineServer to 
regionAssignments means A,B,C are online regions(In case of B its correct but A 
and B not because not yet assigned to any region server).
6)Any way B will be handled as part of processRIT
7)Now while recovering enabling table we will check for the regions not in 
regionAssignments and assign those through bulk assign.(C wont be served by any 
region server but available as online region) which is unexpected.

bq. If not in transition, but assigned, we don't need to assign it any more. 
This will helpful to avoid double assignments for regions already in transtion 
during EnableTableHandler but may not solve problem fully.
                
> Master clean start up and Partially enabled tables make region assignment 
> inconsistent.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-6317
>                 URL: https://issues.apache.org/jira/browse/HBASE-6317
>             Project: HBase
>          Issue Type: Bug
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: rajeshbabu
>             Fix For: 0.92.2, 0.96.0, 0.94.2
>
>         Attachments: HBASE-6317_94.patch, HBASE-6317_94_3.patch, 
> HBASE-6317_trunk_2.patch
>
>
> If we have a  table in partially enabled state (ENABLING) then on HMaster 
> restart we treat it as a clean cluster start up and do a bulk assign.  
> Currently in 0.94 bulk assign will not handle ALREADY_OPENED scenarios and it 
> leads to region assignment problems.  Analysing more on this we found that we 
> have better way to handle these scenarios.
> {code}
> if (false == checkIfRegionBelongsToDisabled(regionInfo)
>             && false == checkIfRegionsBelongsToEnabling(regionInfo)) {
>           synchronized (this.regions) {
>             regions.put(regionInfo, regionLocation);
>             addToServers(regionLocation, regionInfo);
>           }
> {code}
> We dont add to regions map so that enable table handler can handle it.  But 
> as nothing is added to regions map we think it as a clean cluster start up.
> Will come up with a patch tomorrow.

--
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

        

Reply via email to