You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/10/04 03:44:10 UTC

[GitHub] [hbase] pankaj72981 commented on a change in pull request #2313: HBASE-24900 Make retain assignment configurable during SCP

pankaj72981 commented on a change in pull request #2313:
URL: https://github.com/apache/hbase/pull/2313#discussion_r499202535



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java
##########
@@ -416,13 +416,8 @@ public void reportTransition(MasterProcedureEnv env, RegionStateNode regionNode,
 
   // Should be called with RegionStateNode locked
   public void serverCrashed(MasterProcedureEnv env, RegionStateNode regionNode,
-      ServerName serverName) throws IOException {
-    // force to assign to a new candidate server
-    // AssignmentManager#regionClosedAbnormally will set region location to null
-    // TODO: the forceNewPlan flag not be persistent so if master crash then the flag will be lost.
-    // But assign to old server is not big deal because it not effect correctness.
-    // See HBASE-23035 for more details.
-    forceNewPlan = true;
+      ServerName serverName, boolean forceNewPlan) throws IOException {
+    this.forceNewPlan = forceNewPlan;

Review comment:
       Sorry for the late reply Anoop.
   
   > On a method call, we set a state variable. ! Is that really wanted? Seems before also this was happening but always set to true. Now it can change. I did not see the class how this var being used. But can we check pls?
   
   Yeah, based on this flag we decide whether to retain assignment to last host during SCP.  
   
   https://github.com/apache/hbase/blob/b0170d0e240f38fb6cedb5e8a34ff08eb9364a6f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java#L181
   
   
   https://github.com/apache/hbase/blob/b0170d0e240f38fb6cedb5e8a34ff08eb9364a6f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java#L2054
   
   
   https://github.com/apache/hbase/blob/b0170d0e240f38fb6cedb5e8a34ff08eb9364a6f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java#L2125




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org