Class TransactionInProgressException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- software.amazon.awssdk.core.exception.SdkException
-
- software.amazon.awssdk.core.exception.SdkServiceException
-
- software.amazon.awssdk.awscore.exception.AwsServiceException
-
- software.amazon.awssdk.services.dynamodb.model.DynamoDbException
-
- software.amazon.awssdk.services.dynamodb.model.TransactionInProgressException
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<TransactionInProgressException.Builder,TransactionInProgressException>
@Generated("software.amazon.awssdk:codegen") public final class TransactionInProgressException extends DynamoDbException implements ToCopyableBuilder<TransactionInProgressException.Builder,TransactionInProgressException>
The transaction with the given request token is already in progress.
Recommended Settings
This is a general recommendation for handling the
TransactionInProgressException
. These settings help ensure that the client retries will trigger completion of the ongoingTransactWriteItems
request.-
Set
clientExecutionTimeout
to a value that allows at least one retry to be processed after 5 seconds have elapsed since the first attempt for theTransactWriteItems
operation. -
Set
socketTimeout
to a value a little lower than therequestTimeout
setting. -
requestTimeout
should be set based on the time taken for the individual retries of a single HTTP request for your use case, but setting it to 1 second or higher should work well to reduce chances of retries andTransactionInProgressException
errors. -
Use exponential backoff when retrying and tune backoff if needed.
Assuming default retry policy, example timeout settings based on the guidelines above are as follows:
Example timeline:
-
0-1000 first attempt
-
1000-1500 first sleep/delay (default retry policy uses 500 ms as base delay for 4xx errors)
-
1500-2500 second attempt
-
2500-3500 second sleep/delay (500 * 2, exponential backoff)
-
3500-4500 third attempt
-
4500-6500 third sleep/delay (500 * 2^2)
-
6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds have elapsed since the first attempt reached TC)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TransactionInProgressException.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactionInProgressException.Builder
builder()
Map<String,SdkField<?>>
sdkFieldNameToField()
List<SdkField<?>>
sdkFields()
static Class<? extends TransactionInProgressException.Builder>
serializableBuilderClass()
TransactionInProgressException.Builder
toBuilder()
-
Methods inherited from class software.amazon.awssdk.awscore.exception.AwsServiceException
awsErrorDetails, getMessage, isClockSkewException, isThrottlingException
-
Methods inherited from class software.amazon.awssdk.core.exception.SdkServiceException
extendedRequestId, isRetryableException, requestId, statusCode
-
Methods inherited from class software.amazon.awssdk.core.exception.SdkException
create, numAttempts, rawMessage, retryable
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
toBuilder
public TransactionInProgressException.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<TransactionInProgressException.Builder,TransactionInProgressException>
- Overrides:
toBuilder
in classDynamoDbException
-
builder
public static TransactionInProgressException.Builder builder()
-
serializableBuilderClass
public static Class<? extends TransactionInProgressException.Builder> serializableBuilderClass()
-
sdkFields
public final List<SdkField<?>> sdkFields()
- Specified by:
sdkFields
in interfaceSdkPojo
- Overrides:
sdkFields
in classSdkServiceException
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
-