Closed doctrinebot closed 8 years ago
Comment created by @doctrinebot:
A related Github Pull-Request [GH-718] was labeled: https://github.com/doctrine/dbal/pull/718
Fixed in #718
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of Tobion:
Url: https://github.com/doctrine/dbal/pull/718
Message:
It is best practice to implement retry logic for transactions that are aborted because of deadlocks or timeouts. This makes such method available inside the DBAL and also adds detection for errors where retrying makes sense in the different database drivers.
Deadlocks and timeouts are caused by lock contention and you often can design your application to reduce the likeliness that such an error occurs. But it's impossible to guarantee that such error conditions will never occur. This is why implementing retrying logic for such errors is actually a must when you have to ensure the application does not fail in edge cases or high load. Some references where something similar has already been implemented:
I chose the name
retryable
because it is consistent withtransactional
. I think the implementation is quite straight forward and fits very well with the DBAL design.