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
When a RetryableException is thrown, entitymanager should not be closed #6272
Comments
Is there a good approach to retrying after deadlocks in the meantime? |
Is there any "at least not so bad" and simple/quick solution before v3.x release? For example, i have Any solutions can be done here now except making |
Approaches were mentioned in #865, but it still will be an entity manager without persisted entities. |
…able edge case deadlocks and slow locks Simply retrying doesn't work in Doctrine 2.x because it destroys the EntityManager before throwing 'retryable' exceptions. See doctrine/orm#6272 and https://medium.com/lebouchondigital/thread-safe-business-logic-with-doctrine-f09c633f6554
Is there already someone that found a solutions for this because impossible to retry it even when you reset the manager ? The only solution is to do the full request again in rabbitMQ till it's working. |
When a RetryableException is thrown, entitymanager should not be closed
The "bad" code is here : https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L400
RetryableException are DeadlockException and LockWaitTimeoutException
entitymanager should not be closed so we can retry the flush like that
The text was updated successfully, but these errors were encountered: