- final Collection<T> txns = getSubtransactions();
- final Collection<DOMStoreThreePhaseCommitCohort> cohorts = new ArrayList<>(txns.size());
-
- CheckedFuture<Void, TransactionCommitFailedException> ret;
- try {
- for (final T txn : txns) {
- cohorts.add(txn.ready());
+ FluentFuture<? extends CommitInfo> ret;
+ final var tx = getSubtransaction();
+ if (tx == null) {
+ ret = CommitInfo.emptyFluentFuture();
+ } else {
+ try {
+ ret = impl.commit(this, tx.ready());
+ } catch (RuntimeException e) {
+ ret = immediateFailedFluentFuture(TransactionCommitFailedExceptionMapper.COMMIT_ERROR_MAPPER.apply(e));