-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Catch throwables in mview updating #23125
Catch throwables in mview updating #23125
Conversation
Hi @QuentinFarizonAfrimarket. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
throw $exception; | ||
} | ||
} | ||
} | ||
|
||
private function executeAction($action, $currentVersionId, $lastVersionId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typehints, please, and declare strict types should also work, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orlangur Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QuentinFarizonAfrimarket please add declare(strict types)
on top and if builds will be green - squash into a single commit. If not, don't add such line and just squash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, tests pass with strict type
51a2019
to
13e57f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QuentinFarizonAfrimarket nice! Please just make a single commit out of it.
I would honestly keep it as 2 separate commits, they do 2 different things (one bug fix, another is cleanup), so it makes sense to keep them separate in my opinion. |
@hostep ah, ok, I didn't notice bugfix + refactoring are separated, thought that was in first commit and then some adjustments. |
Hi @orlangur, thank you for the review. |
@QuentinFarizonAfrimarket thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Yes it was my intention to separate behaviour and refactoring :) |
13e57f3
to
ba4dff7
Compare
QA passed. |
Hi @QuentinFarizonAfrimarket, thank you for your contribution! |
2.2 : #23124
2.3 : #23125
Description
Certain type of runtime exception weren't caught during mview updating, which caused some mview to be stuck in "processing" mode.
Refer to #23054 for more detail about the issue.
This modification is very similar to the one made here : 5927a75
Fixed Issues
#23054
Manual testing scenarios
make an mview updating crash with a Throwable (not an Exception)
process ends, mview is still in 'processing' in database
it is never picked up again
Questions or comments
This does not prevent against all types of crashes (like process out of memory or server stop abruptly, so it is only a step in making indexing crons more resilient
Contribution checklist (*)