Annotation Interface CrdbRetry
Retries the annotated method on CockroachDB serialization anomalies
(SQLSTATE
40001 / 40P01) using adaptive exponential backoff.
Unlike Transactional, this annotation does not open a transaction;
it simply re-invokes the method body. Combine with Transactional for
transactional retry, or use standalone around an already-transactional unit.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionlongBase delay between attempts, in milliseconds.longUpper bound on any single backoff delay, in milliseconds.intMaximum number of retry attempts before giving up.
-
Element Details
-
maxRetries
int maxRetriesMaximum number of retry attempts before giving up.- Default:
5
-
baseDelayMillis
long baseDelayMillisBase delay between attempts, in milliseconds.- Default:
100L
-
maxDelayMillis
long maxDelayMillisUpper bound on any single backoff delay, in milliseconds.- Default:
5000L
-