Class TransactionFinishedException

All Implemented Interfaces:
Serializable, TraceableException, RetriableTransactionException

public class TransactionFinishedException extends TransactionException implements RetriableTransactionException
Thrown when an operation cannot proceed because its transaction has already been finished (aborted, timed out, or killed).

The failed operation can never succeed under the same transaction, so retrying it as-is (for example, replaying the same replica request) is pointless and must not happen. What is expected to succeed is retrying the whole transactional closure with a new transaction — for example, via IgniteTransactions.runInTransaction(java.util.function.Consumer<org.apache.ignite.tx.Transaction>) — which is why this class implements RetriableTransactionException.

See Also:
  • Constructor Details

    • TransactionFinishedException

      public TransactionFinishedException(int code, String message, @Nullable @Nullable Throwable cause)
      Creates the exception.
      Parameters:
      code - Full error code from the TX_ALREADY_FINISHED_* family.
      message - Detail message.
      cause - Optional underlying cause (e.g. the error that aborted the transaction).
    • TransactionFinishedException

      public TransactionFinishedException(UUID traceId, int code, String message, @Nullable @Nullable Throwable cause)
      Creates the exception.
      Parameters:
      traceId - Trace ID.
      code - Full error code.
      message - Detail message.
      cause - Optional underlying cause.