[
https://issues.apache.org/jira/browse/HBASE-6881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464262#comment-13464262
]
Jimmy Xiang commented on HBASE-6881:
------------------------------------
Thanks for the review. I put it on RB for easy review:
https://reviews.apache.org/r/7303/
For the removed code, it is not needed, because if regionAlreadyInTransition,
we already transition the state to offline state in the exception handling part.
For the final param, sure, I will use a local one. The state changes because we
transition region state in this method.
As to the comment, because we don't exclude the server of the origin plan.
Even we force a new plan, it is possible to get the original server since it is
randomly selected. If there is only one region server as in most unit tests,
it will be the existing plan. The reason we don't want to exclude the original
server is that it could be the only server up at that time (as in most unit
tests). If we exclude it, the newPlan will be null and all servers will be
marked offline. If the region is ROOT, then it leads to HBASE-6880 and hanging
unit test.
> All regionservers are marked offline even there is still one up
> ---------------------------------------------------------------
>
> Key: HBASE-6881
> URL: https://issues.apache.org/jira/browse/HBASE-6881
> Project: HBase
> Issue Type: Bug
> Reporter: Jimmy Xiang
> Assignee: Jimmy Xiang
> Attachments: trunk-6881.patch
>
>
> {noformat}
> + RegionPlan newPlan = plan;
> + if (!regionAlreadyInTransitionException) {
> + // Force a new plan and reassign. Will return null if no servers.
> + newPlan = getRegionPlan(state, plan.getDestination(), true);
> + }
> + if (newPlan == null) {
> this.timeoutMonitor.setAllRegionServersOffline(true);
> LOG.warn("Unable to find a viable location to assign region " +
> state.getRegion().getRegionNameAsString());
> {noformat}
> Here, when newPlan is null, plan.getDestination() could be up actually.
--
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