-
Notifications
You must be signed in to change notification settings - Fork 174
FIxed race condition on deleting old adjustment records #3901
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
Conversation
|
To get this potential fix early and test out the PR, change your "require": {
"craftcms/commerce": "dev-feature/pt-2407-fix-adjustment-id-race-condition as 4.8.1.2",
"...": "..."
}Then run We will update this ticket once the release is out. |
|
@lukeholder any news on this? |
|
@lukeholder I want to test this on Craft 5, can you make an updated branch for that? |
|
Now seeing a lot of these errors so I can test it properly if you want |
|
@boboldehampsink Yes please, testing this would be useful. Updated to 5.x base branch. |
Fixed race condition in deleting old adjustments See craftcms/commerce#3901 Tested by customer here: https://app.frontapp.com/open/cnv_geujeix?key=nV4JNZkyEDPmMZxQ-f4Pwpev3ko5rULf
|
@lukeholder have been running this for a while but the errors are still showing up |
|
@boboldehampsink we have decided that throwing an exception when trying to save a line item or adjustment whose ID is already deleted from the database shouldn't throw an exception, and instead will log it and return false from the We think rapid re-saves of the order is causing this but since nowhere in our code do we look at the return value of those saves (and don't run validation) its safe to return false. We could look to add a validation error to the Can you please retest on this branch and let me know if the errors have stopped. (You will see messages in the logs but only as information, the same as saving an invalid line item or adjustment). As for the race condition on order save, we are looking to other solutions but will do so in a larger release of commerce. |
…thub.com:craftcms/commerce into feature/pt-2407-fix-adjustment-id-race-condition
|
Replaced by #4030 which will be merged into 5.4 soon. |
Description
No need to delete the Record if we already drop the rows directly in the database.
Related issues
#3283