You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/06/01 09:21:23 UTC

[GitHub] [ozone] guihecheng commented on a change in pull request #2288: HDDS-5109. Track OM prepare intermittent integration test failure.

guihecheng commented on a change in pull request #2288:
URL: https://github.com/apache/ozone/pull/2288#discussion_r642932590



##########
File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerPrepare.java
##########
@@ -408,21 +437,27 @@ private void assertClusterPrepared(long preparedIndex,
       LambdaTestUtils.await(WAIT_TIMEOUT_MILLIS,
           1000, () -> {
           if (!om.isRunning()) {
+            LOG.info("{} is not yet started.", om.getOMNodeId());
             return false;
           } else {
             boolean preparedAtIndex = false;
             OzoneManagerPrepareState.State state =
                 om.getPrepareState().getState();
 
+            LOG.info("{} has prepare status: {} index: {}.",
+                om.getOMNodeId(), state.getStatus(), state.getIndex());
+
             if (state.getStatus() == PrepareStatus.PREPARE_COMPLETED) {
-              if (state.getIndex() == preparedIndex) {
+              if (state.getIndex() >= expectedPreparedIndex) {
                 preparedAtIndex = true;
               } else {
                 // State will not change if we are prepared at the wrong index.

Review comment:
       IMHO, here we should consider a case: 2 successive prepares(just like the case testPrepareWithTransactions), we have a chance to get PREPARE_COMPLETED of the first round, then its index may be < expectedPreparedIndex of the second round,  because the status of om is async updated(just as we wait for it to update in prepare CLI).
   Maybe we could add a retry / sleep / wait for the updated prepare status? @errose28 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org