Apache9 commented on a change in pull request #3220:
URL: https://github.com/apache/hbase/pull/3220#discussion_r627521865



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java
##########
@@ -230,6 +230,10 @@ private void 
waitForRSShutdownToStartAndFinish(MasterThread activeMaster,
     }
     log("Server [" + serverName + "] marked as dead, waiting for it to " +
         "finish dead processing");
+    while (!sm.isDeadServerSCPExecuted(serverName)) {
+      log("Wait [" + serverName + "] SCP be executed");
+      Thread.sleep(1);

Review comment:
       Please use UTIL.waitFor if possible. And Thread.sleep(1) will cause a 
lot of log messages?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
##########
@@ -500,6 +500,15 @@ public boolean areDeadServersInProgress() throws 
IOException {
       .anyMatch(p -> !p.isFinished() && p instanceof ServerCrashProcedure);
   }
 
+  /**
+   * Checks if the SCP of specific dead server has been executed.
+   * @return true if the SCP of specific serverName has been executed, false 
if not
+   */
+  boolean isDeadServerSCPExecuted(ServerName serverName) throws IOException {

Review comment:
       Can we move this method to test code? I think it is only used for 
testing.




-- 
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:
us...@infra.apache.org


Reply via email to