[
https://issues.apache.org/jira/browse/HBASE-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589417#comment-13589417
]
rajeshbabu commented on HBASE-7923:
-----------------------------------
bq. In this case we should go with unassign(false) right?
Actually it should be unassign(false) but now its not.
force unassign in master actually for forcing to send close RPC.
{code}
} else if (force && (state.isPendingClose() || state.isClosing())) {
LOG.debug("Attempting to unassign region " +
region.getRegionNameAsString() +
" which is already " + state.getState() +
" but forcing to send a CLOSE RPC again ");
state.updateTimestampToNow();
{code}
bq. Can we do onething, have only one unassign and handle both cases.
It will be good.I will make changes and as below with one unassign.
{code}
LOG.debug("Close region " + hri.getRegionNameAsString()
+ " on current location if it is online and reassign.force=" + force);
this.assignmentManager.unassign(hri, force);
if (!this.assignmentManager.getRegionStates().isRegionInTransition(hri)
&& !this.assignmentManager.getRegionStates().isRegionAssigned(hri)) {
LOG.debug("Region " + hri.getRegionNameAsString()
+ " is not online on any region server, reassigning it.");
assignRegion(hri);
}
{code}
> force unassign can confirm region online on any RS to get rid of double
> assignments.
> ------------------------------------------------------------------------------------
>
> Key: HBASE-7923
> URL: https://issues.apache.org/jira/browse/HBASE-7923
> Project: HBase
> Issue Type: Improvement
> Reporter: rajeshbabu
> Assignee: rajeshbabu
> Fix For: 0.95.0
>
> Attachments: HBASE-7923_2.patch, HBASE-7923.patch
>
>
> Presently in force unassign we are offlining a region from AM and reassigning
> it, which may cause double assignments.
> {code}
> this.assignmentManager.regionOffline(hri);
> assignRegion(hri);
> {code}
> Any way if a region is not served by any RS we are offlining the region from
> AM.
> {code}
> if (t instanceof NotServingRegionException) {
> if (transitionInZK) {
> deleteClosingOrClosedNode(region);
> }
> regionOffline(region);
> return;
> }
> {code}
> We can change as below just to confirm whether region online on any RS.
> {code}
> this.assignmentManager.unassign(hri,force);
> if(!this.assignmentManager.getRegionStates().isRegionInTransition(hri) &&
> !this.assignmentManager.getRegionStates().isRegionAssigned(hri) ){
> assignRegion(hri);
> }
> {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