Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Presently in force unassign we are offlining a region from AM and reassigning it, which may cause double assignments.
this.assignmentManager.regionOffline(hri);
assignRegion(hri);
Any way if a region is not served by any RS we are offlining the region from AM.
if (t instanceof NotServingRegionException) { if (transitionInZK) { deleteClosingOrClosedNode(region); } regionOffline(region); return; }
We can change as below just to confirm whether region online on any RS.
this.assignmentManager.unassign(hri,force); if(!this.assignmentManager.getRegionStates().isRegionInTransition(hri) && !this.assignmentManager.getRegionStates().isRegionAssigned(hri) ){ assignRegion(hri); }