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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]