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 16:59:40 UTC

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

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



##########
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:
       Yes good catch. This is the cause of the intermittent failure in testPrepareWithTransactions. I don't think we can fail fast out of here. We must wait for the transaction index to be at least the expected prepare index to pass. I was able to repro the intermittent failure, and after removing this fail fast case from the code I have not observed the failure.




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