TransactionCommitAmbiguousException

class TransactionCommitAmbiguousException(e: CoreTransactionCommitAmbiguousException) : TransactionFailedException

The transaction expired at the point of trying to commit it. It is ambiguous whether the transaction has committed or not. Actors may be able to see the content of this transaction.

This error is result of inevitable and unavoidable edge cases when working with unreliable networks. For example, consider an ordinary mutation being made over the network to any database. The mutation could succeed on the database-side, and then just before the result is returned to the client, the network connection drops. The client cannot receive the success result and will time out - it is ambiguous to it whether the mutation succeeded or not.

The transactions layer will work to resolve the ambiguity up until the transaction expires, but if unable to resolve it in that time, it is forced to raise this error. The transaction may or may not have been successful, and error-handling of this is highly application-dependent.

An asynchronous cleanup process will try to complete the transaction: roll it back if it didn't commit, roll it forwards if it did.

Constructors

Link copied to clipboard
fun TransactionCommitAmbiguousException(e: CoreTransactionCommitAmbiguousException)

Functions

Link copied to clipboard
fun addSuppressed(p0: Throwable)
Link copied to clipboard
@Stability.Uncommitted
open fun context(): ErrorContext
Link copied to clipboard
open fun fillInStackTrace(): Throwable
Link copied to clipboard
open fun getLocalizedMessage(): String
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val logs: List<TransactionLogEvent>

Returns the in-memory log built up during each transaction. The application may want to write this to their own logs, for example upon transaction failure.

Link copied to clipboard
override val message: String?
Link copied to clipboard
val transactionId: String