-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Feature Request
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
Summary
As far as I can see, there is currently no way to perform a SELECT FOR UPDATE SKIP LOCKED
(MySQL, PostgreSQL) with Doctrine.
This is really useful, for example when lauching several concurrent workers picking jobs from a single table, as it effectively prevents two workers from getting the same job, and automatically and immediately makes the job available again in case the transaction is aborted.
Would you be willing to add this feature? This could be implemented this way:
$em->find($id, LockMode::PESSIMISTIC_WRITE | LockMode::SKIP_LOCKED);
I can open a PR if you agree with this.
IvanDugandzic, alebedev80, jusurb, Dukecz, paragor and 17 more
Metadata
Metadata
Assignees
Labels
No labels