[
https://issues.apache.org/jira/browse/HBASE-18984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16213161#comment-16213161
]
Yi Liang commented on HBASE-18984:
----------------------------------
[~ram_krish]
I just fully check the code, I am wrong for the above comments, when do bulk
region assign, the region is transition would not be assigned. So there are no
additional AssignProcedure for region has old procedure. And we can safely
remove the step that CLOSING AND OPENING writing into meta
See loadMeta below, which use to visit meta to create regionstatenode for all
regions
{code}
private void loadMeta() throws IOException {
// TODO: use a thread pool
regionStateStore.visitMeta(new RegionStateStore.RegionStateVisitor() {
@Override
public void visitRegionState(final RegionInfo regionInfo, final State
state,
final ServerName regionLocation, final ServerName lastHost, final
long openSeqNum) {
final RegionStateNode regionNode =
regionStates.getOrCreateRegionNode(regionInfo);
synchronized (regionNode) {
if (!regionNode.isInTransition()) {
regionNode.setState(state);
regionNode.setLastHost(lastHost);
regionNode.setRegionLocation(regionLocation);
regionNode.setOpenSeqNum(openSeqNum);
if (state == State.OPEN) {
assert regionLocation != null : "found null region location for "
+ regionNode;
regionStates.addRegionToServer(regionLocation, regionNode);
} else if (state == State.OFFLINE || regionInfo.isOffline()) {
regionStates.addToOfflineRegions(regionNode);
} else {
// These regions should have a procedure in replay
regionStates.addRegionInTransition(regionNode, null);
}
}
}
}
});
// every assignment is blocked until meta is loaded.
wakeMetaLoadedEvent();
}
{code}
> [AMv2] Retain assignment does not work well in AMv2
> ---------------------------------------------------
>
> Key: HBASE-18984
> URL: https://issues.apache.org/jira/browse/HBASE-18984
> Project: HBase
> Issue Type: Bug
> Components: proc-v2
> Affects Versions: 2.0.0
> Reporter: Yi Liang
> Assignee: Yi Liang
> Fix For: 2.0.0
>
> Attachments: HBASE-18984-V1-master.patch, Screen Shot 2017-10-10 at
> 2.24.19 PM.png
>
>
> work on 8.17 Retain assignment in
> https://docs.google.com/document/d/1eVKa7FHdeoJ1-9o8yZcOTAQbv0u0bblBlCCzVSIn69g/edit#heading=h.epjn9nege80k
> To reproduce this error, in hbase shell:
> createTable t1 --> list_regions 't1' --> disable 't1' ---> enable 't1' -->
> list_reigons 't1' (maybe you need to try enable/disable multiple times)
> See attached images. same region assigned to different region servers
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)