-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blameable] Remove scheduleExtraUpdate calls #320
Conversation
I'm having an issue with these extra database calls too, mainly because of the logging behavior: I'm getting twice the amount of logs I'd expect. As far as I could dig into, this behaviour was introduced in ca44b17, but I don't know how to find what was the first release to include the commit, so as to look for any reference. Are there any side effects to removing the scheduled extra updates? |
thanks for the detailled explanation! I wonder if we added these extra updates because of some edge cases. |
Hey, I will try to add some tests in the next days. Thanks for feedback ! |
Hi, I won't have time to work on this at the moment. If someone want to create some tests, feel free to duplicate my PR ;) |
d018cdf
to
29d5252
Compare
29d5252
to
a036962
Compare
Hello, after a long time I finally decided to update my PR with tests ! I fixed Could someone please have a look ? Thank you ! |
ping @docteurklein do you still work on this project ? |
Hey there ;) Could someone please check (and merge?) this PR please ? Thank you ! |
Could you rebase on current |
I made huge refactoring on adding types in methods and properties, voids, scalars, array etcs., so basically I had to recreate every interface from scratch. Thanks for your work 👍 |
Sorry, I was going to rebase it soon. Great you could cherry-pick it ! 👍 |
Issue
BlameableSubscriber
(at least) is always doing an extra database update after inserting/updating an entity. It seems to be caused by thescheduleExtraUpdate
calls.This is especially annoying because I use doctrine version locking, and the version is incrementing 2 by 2.
Examples (simplified)
Insert
Update
Solution
Removing these calls fixes the issue : only 1 insert or update is performed, and the createdBy and updatedBy are inserted/updated correctly.
Examples (simplified)
Insert
Update
Conclusion
I'm not sure about the side effects of removing this call, please feel free to comment this PR !