private void recoverAndCommitInternal(TransactionHolder<TXN> transactionHolder) {
		try {
			logWarningIfTimeoutAlmostReached(transactionHolder);
			recoverAndCommit(transactionHolder.handle);
		} catch (final Exception e) {
			final long elapsedTime = clock.millis() - transactionHolder.transactionStartTime;
			if (ignoreFailuresAfterTransactionTimeout && elapsedTime > transactionTimeout) {
				LOG.error("Error while committing transaction {}. " +
						"Transaction has been open for longer than the transaction timeout ({})." +
						"Commit will not be attempted again. Data loss might have occurred.",
					transactionHolder.handle, transactionTimeout, e);
			} else {
				throw e;
			}
		}
	}
private void recoverAndCommitInternal ( TransactionHolder < TXN > transactionHolder ) { try { logWarningIfTimeoutAlmostReached ( transactionHolder ) ; recoverAndCommit ( transactionHolder . handle ) ; } catch ( final Exception e ) { final long elapsedTime = clock . millis ( ) - transactionHolder . transactionStartTime ; if ( ignoreFailuresAfterTransactionTimeout && elapsedTime > transactionTimeout ) { LOG . error ( "Error while committing transaction {}. " + "Transaction has been open for longer than the transaction timeout ({})." + "Commit will not be attempted again. Data loss might have occurred." , transactionHolder . handle , transactionTimeout , e ) ; } else { throw e ; } } }
This method must be the only place to call {@link #recoverAndCommit(Object)} to ensure that
the configuration parameters {@link #transactionTimeout} and
{@link #ignoreFailuresAfterTransactionTimeout} are respected.