- handleException(clientSubmitFuture, transaction, cohorts,
- CAN_COMMIT, TransactionCommitFailedExceptionMapper.CAN_COMMIT_ERROR_MAPPER,
- new TransactionCommitFailedException(
- "Can Commit failed, no detailed cause available."));
+ handleException(clientSubmitFuture, transaction, cohorts, CAN_COMMIT, CAN_COMMIT_ERROR_MAPPER,
+ new TransactionCommitFailedException("Can Commit failed, no detailed cause available."));
+ } else if (!cohortIterator.hasNext()) {
+ // All cohorts completed successfully - we can move on to the preCommit phase
+ doPreCommit(startTime, clientSubmitFuture, transaction, cohorts);