3 ms·
Doctrine2 (PHP) supports this natively. I've never used this approach, but after working a lot with row-level locks (SELECT ... FOR UPDATE) errors in environme
by agopaul 10y ago
Doctrine2 (PHP) supports this natively.
I've never used this approach, but after working a lot with row-level locks (SELECT ... FOR UPDATE) errors in environments with sustained load, I think next time I'm going to evaluate this approach.
Row-level locks need to be carefully implemented in order to avoid deadlocks, which can occur for a number of reasons (eg. missing indexes, other transactions locking rows in different orders, etc.).