[ https://issues.apache.org/jira/browse/HBASE-6881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618312#comment-13618312 ]
Jean-Marc Spaggiari commented on HBASE-6881: -------------------------------------------- Sorry for beeing late on that: {code} RegionPlan newPlan = plan; - if (!regionAlreadyInTransitionException) { + if (!regionAlreadyInTransitionException && !serverNotRunningYet) { // Force a new plan and reassign. Will return null if no servers. - newPlan = getRegionPlan(state, plan.getDestination(), true); + // The new plan could be the same as the existing plan since we don't + // exclude the server of the original plan, which should not be + // excluded since it could be the only server up now. + newPlan = getRegionPlan(state, true); } if (newPlan == null) { {code} If there is a possibility for newPlan to be null, than mean there is a possibility for plan to be null, and therefore for plan.getDestination() to fail with NPE? Or will plan never be null if regionAlreadyInTransitionException and serverNotRunningYet are false? > 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 > Fix For: 0.95.0 > > Attachments: trunk-6881.patch, trunk-6881_v3.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