use of com.palantir.atlasdb.transaction.api.TransactionLockTimeoutException in project atlasdb by palantir.
the class SnapshotTransaction method throwIfImmutableTsOrCommitLocksExpired.
private void throwIfImmutableTsOrCommitLocksExpired(@Nullable LockToken commitLocksToken) {
Set<LockToken> expiredLocks = refreshCommitAndImmutableTsLocks(commitLocksToken);
if (!expiredLocks.isEmpty()) {
final String baseMsg = "Required locks are no longer valid. ";
String expiredLocksErrorString = getExpiredLocksErrorString(commitLocksToken, expiredLocks);
TransactionLockTimeoutException ex = new TransactionLockTimeoutException(baseMsg + expiredLocksErrorString);
log.error(baseMsg + "{}", expiredLocksErrorString, ex);
throw ex;
}
}
Aggregations