[ https://issues.apache.org/jira/browse/HBASE-6317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424584#comment-13424584 ]
rajeshbabu commented on HBASE-6317: ----------------------------------- @Jimmy, bq. The inconsistent we are trying to fix here is about the possible double-assignment, right? Any other inconsistency? Yes double assignments only. But it may not like calling assign twice for a region at a time(one region available as online region on two region servers) bq.If it is just for double-assignment, I think it is better to prevent it from AssignmentManager (or the new RegionStates introduced in HBASE-6272). But region state information for all regions may not be available during master start up. If regions are in transition only we will update region state and put into rit in processRIT. We may not have region state info for the ENABLING table regions which are already assigned or assign not yet started. bq. Whenever a new region is online, if it is assigned to a server different from that in RegionStates, we can put the corresponding info to a queue Let's suppose partially enabled regions are going to assign to a RS in the middle master restarted then the regions may be assigned to other region server also. We can avoid double assignments happening at a time by region states introduced in HBASE-6272. But here we may call assign(which may assign region to RS1) for a region only once after master restart but before restart the region may be available as online region on other region server(RS2). Please correct me if i am wrong. > 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 > > > 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