doctrine1 icon indicating copy to clipboard operation
doctrine1 copied to clipboard

Per record locking

Open mkopinsky opened this issue 6 years ago • 2 comments

The Doctrine_Locking_Manager_Pessimistic has a bug where instead of locking by the record's ID, it was locking by the string "id". Which obviously meant you couldn't lock two things at once.

In our use case we were more interested in tracking the request ID which created a lock rather than the user, which explains the change of language from user_ident to lock_key in the PR. The changed column name I guess is technically BC-breaking for people actively using this, so we might want to revert that. (EDIT: the BC break has been reverted) On the other hand, given how clearly broken this was, I'm not sure if there even can be people using this in prod.

The added unit test fails when run against the code before these changes.

mkopinsky avatar Mar 05 '18 18:03 mkopinsky

Hey @j0k3r any chance you could merge this?

mkopinsky avatar Apr 04 '18 16:04 mkopinsky

I'm sure about merging that. @GromNaN what do you think?

j0k3r avatar Apr 04 '18 19:04 j0k3r