-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransactionTimedOutException during DefaultLockRepository.acquire() #3307
Comments
I think you are right: we need to add a
|
I will create a pull request for it. |
Marked respectively. Thanks |
What does represent the parameter |
Not sure what is your concern on the matter, but see its JavaDocs:
So, therefore it a timeout for the whole call including Java and DB access. |
So I think that 1s is not enough for db access through particular networks. How can we expose this parameter to setup into project side? Is it possible to replace
|
I think the best and simplest way is to extend a Feel free to do such a change in your current PR - and we'll review & merger it shortly. Thanks |
The current PR concern the management of the timeout exception. So I don't need to modify this one. You are true, for a particular case the simplest way is to extend and override! Thank you so much for this talk ;) |
Fixes #3307 The `DefaultLockRepository.acquire()` is transactional method and can fail with the `TransactionTimedOutException`. When we call `JdbcLock.lock()`, we expect an attempt until we really obtain a lock. * Treat a `TransactionTimedOutException` as a `TransientDataAccessException` and therefore retry a locking attempt logic **Cherry-pick to 5.3.x, 5.2.x & 4.3.x** (cherry picked from commit b0cd015)
Fixes #3307 The `DefaultLockRepository.acquire()` is transactional method and can fail with the `TransactionTimedOutException`. When we call `JdbcLock.lock()`, we expect an attempt until we really obtain a lock. * Treat a `TransactionTimedOutException` as a `TransientDataAccessException` and therefore retry a locking attempt logic **Cherry-pick to 5.3.x, 5.2.x & 4.3.x** (cherry picked from commit b0cd015)
Fixes #3307 The `DefaultLockRepository.acquire()` is transactional method and can fail with the `TransactionTimedOutException`. When we call `JdbcLock.lock()`, we expect an attempt until we really obtain a lock. * Treat a `TransactionTimedOutException` as a `TransientDataAccessException` and therefore retry a locking attempt logic **Cherry-pick to 5.3.x, 5.2.x & 4.3.x** (cherry picked from commit b0cd015) # Conflicts: # spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock/JdbcLockRegistry.java
@artembilan Thank you very much |
Hi,
I'm facing to
TransactionTimedOutException
that occurs atDefaultLockRepository.acquire()
. I think is the parametertimeout = 1
on the@Transactional
annotation on it.Why the lock is not retried in this case ? It's a naive question, really.
Thank you in advance!
The text was updated successfully, but these errors were encountered: