Apache9 commented on code in PR #4945:
URL: https://github.com/apache/hbase/pull/4945#discussion_r1066545964


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java:
##########
@@ -188,6 +225,25 @@ protected boolean waitInitialized(MasterProcedureEnv env) {
     return am.waitMetaLoaded(this) || am.waitMetaAssigned(this, getRegion());
   }
 
+  private void checkAndWaitForOriginalServer(ServerName lastHost)
+    throws ProcedureSuspendedException {
+    boolean isOnline = 
serverManager.findServerWithSameHostnamePortWithLock(lastHost) != null;
+    long retries = 0;
+    while (!isOnline && retries < forceRegionRetainmentRetries) {

Review Comment:
   In this way the procedure will hang here for a very long time without 
releasing the procedure worker. Better suspend the procedure and reschedule it 
again later.



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java:
##########
@@ -126,6 +144,14 @@
 
   private boolean isSplit;
 
+  private boolean forceRegionRetainment;

Review Comment:
   All the below fields should not be stored here, when reloading we will use 
the default constructor to create a procedure and use deserialize method to 
restore the fields, so if you want to store them here, you need to serialize 
them, or you should implement the afterReplay method to initialize them...



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java:
##########
@@ -126,6 +144,14 @@
 
   private boolean isSplit;
 
+  private boolean forceRegionRetainment;
+
+  private ServerManager serverManager;

Review Comment:
   ServerManager can be gotten from MasterProcedureEnv, so we do not need to 
store it here.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to