[
https://issues.apache.org/jira/browse/HBASE-12005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139977#comment-14139977
]
stack commented on HBASE-12005:
-------------------------------
Should you have a method with a nicely descriptive name that you can call for
rs_a and then for rs_b in below? It would make it easier to follow what is
going on?
- if (rs_a == null || rs_b == null || !rs_a.isOnServer(serverName)
- || !rs_b.isOnServer(serverName) || !rs_a.isSplittingNew()
- || !rs_b.isSplittingNew()) {
+ if ((rs_a != null && !(rs_a.isOnServer(serverName) &&
rs_a.isSplittingNew()))
+ || (rs_b != null && !(rs_b.isOnServer(serverName) &&
rs_b.isSplittingNew()))) {
If either is null in below, it is a fatal condition?
+ // Master could have restarted and lost the new region state
+ if (rs_a == null) {
+ regionStates.createRegionState(
+ a, State.SPLITTING_NEW, serverName, null);
+ }
+ if (rs_b == null) {
+ regionStates.createRegionState(
+ b, State.SPLITTING_NEW, serverName, null);
+ }
... yet you test them individually?
Otherwise patch lgtm.
> Split/merge fails if master restarts before PONR
> ------------------------------------------------
>
> Key: HBASE-12005
> URL: https://issues.apache.org/jira/browse/HBASE-12005
> Project: HBase
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Jimmy Xiang
> Assignee: Jimmy Xiang
> Attachments: hbase-12005.patch, hbase-12005_v1.1.patch
>
>
> This applies to RPC based assignment. The root cause is that we don't persist
> the state of the new region(s). If we do persist it, we need to clean it up
> if the split/merge fails.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)