Class TransactionConflictException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.palantir.atlasdb.transaction.api.TransactionFailedException
-
- com.palantir.atlasdb.transaction.api.TransactionFailedRetriableException
-
- com.palantir.atlasdb.transaction.api.TransactionConflictException
-
- All Implemented Interfaces:
Serializable
public final class TransactionConflictException extends TransactionFailedRetriableException
Thrown if there is a conflict detected when a transaction is committed. If two concurrent transactions make calls toTransaction.put(TableReference, java.util.Map)
orTransaction.delete(TableReference, Set)
for the sameCell
, then this is a write-write conflict.The error message should be detailed about what caused the failure and what other transaction conflicted with this one.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransactionConflictException.CellConflict
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactionConflictException
create(TableReference tableRef, long timestamp, Collection<TransactionConflictException.CellConflict> spanningWrites, Collection<TransactionConflictException.CellConflict> dominatingWrites, long elapsedMillis)
TableReference
getConflictingTable()
Collection<TransactionConflictException.CellConflict>
getDominatingWrites()
These conflicts started and committed after our start timestamp.Collection<TransactionConflictException.CellConflict>
getSpanningWrites()
These conflicts had a start timestamp before our start and a commit timestamp after our start.-
Methods inherited from class com.palantir.atlasdb.transaction.api.TransactionFailedRetriableException
canTransactionBeRetried
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getSpanningWrites
public Collection<TransactionConflictException.CellConflict> getSpanningWrites()
These conflicts had a start timestamp before our start and a commit timestamp after our start.
-
getDominatingWrites
public Collection<TransactionConflictException.CellConflict> getDominatingWrites()
These conflicts started and committed after our start timestamp. Having these kinds of conflicts means that we may be a long running transaction.
-
getConflictingTable
public TableReference getConflictingTable()
-
create
public static TransactionConflictException create(TableReference tableRef, long timestamp, Collection<TransactionConflictException.CellConflict> spanningWrites, Collection<TransactionConflictException.CellConflict> dominatingWrites, long elapsedMillis)
-
-