[PR #806] [CLOSED] [RC][WIP] Retry on MySql deadlock errors #8734

Closed
opened 2026-01-22 16:01:26 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/806
Author: @alex88
Created: 9/30/2013
Status: Closed

Base: masterHead: feature/deadlock_retry


📝 Commits (2)

  • 81f7663 Initial setup for deadlock retry
  • 37f4549 Use of ternary operator shortcuts

📊 Changes

2 files changed (+104 additions, -32 deletions)

View changed files

📝 lib/Doctrine/ORM/Configuration.php (+54 -0)
📝 lib/Doctrine/ORM/UnitOfWork.php (+50 -32)

📄 Description

I've done an initial setup of a way to handle MySql deadlocks by retrying the transaction when using em->flush().
I've added 2 configuration variables, one to set how many times to retry and for how long to sleep between each try.

Let me know if this can be merged, is useless or need improvements.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/806 **Author:** [@alex88](https://github.com/alex88) **Created:** 9/30/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/deadlock_retry` --- ### 📝 Commits (2) - [`81f7663`](https://github.com/doctrine/orm/commit/81f76631e71c644411d0e78b0e4a6fb82a884568) Initial setup for deadlock retry - [`37f4549`](https://github.com/doctrine/orm/commit/37f4549fa5e6ba3813d5e37019bdc22c763161be) Use of ternary operator shortcuts ### 📊 Changes **2 files changed** (+104 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Configuration.php` (+54 -0) 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+50 -32) </details> ### 📄 Description I've done an initial setup of a way to handle MySql deadlocks by retrying the transaction when using em->flush(). I've added 2 configuration variables, one to set how many times to retry and for how long to sleep between each try. Let me know if this can be merged, is useless or need improvements. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:01:26 +01:00
admin closed this issue 2026-01-22 16:01:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8734