ChenSammi commented on a change in pull request #29: HDDS-2034. Async RATIS pipeline creation and destroy through heartbeat commands URL: https://github.com/apache/hadoop-ozone/pull/29#discussion_r336866775
########## File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/SCMSafeModeManager.java ########## @@ -190,6 +196,18 @@ public synchronized void validateSafeModeExitRules(String ruleName, */ @VisibleForTesting public void exitSafeMode(EventPublisher eventQueue) { + // Wait a while for as many as new pipelines to be ready + if (createPipelineInSafeMode) { + long sleepTime = config.getTimeDuration( + HddsConfigKeys.HDDS_SCM_WAIT_TIME_AFTER_SAFE_MODE_EXIT, + HddsConfigKeys.HDDS_SCM_WAIT_TIME_AFTER_SAFE_MODE_EXIT_DEFAULT, + TimeUnit.MILLISECONDS); + try { + Thread.sleep(sleepTime); Review comment: This is for unit test. Some existing unit tests will fail because they want to write data once the miniOzone cluster exits the safemode and ready. But not all pipelines are ready to serve the write request after safemode. Maybe I can move this logic to miniOzoneCluster. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org