-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Make sure temporary tables always get cleaned up, even on faillure #27012
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
Make sure temporary tables always get cleaned up, even on faillure #27012
Conversation
Hi @quisse. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
I believe there is a drawback to your fix.
After your changes, the index table will be cleaned up if any exception happens
Better to modify IndexerTableSwapper class to:
- Create a temporary table instead of real in https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/CatalogRule/Model/Indexer/IndexerTableSwapper.php#L50
- or/and cleanup temporary table in class destructor
app/code/Magento/CatalogRule/Model/Indexer/IndexerTableSwapper.php
Outdated
Show resolved
Hide resolved
What's the status here? Just saw an error:
happening on a shop during Will this PR fix this problem? Update: is probably something else, because on a second attempt to deploy to production, we now get:
Great, on to debugging 2.3.5 (again!) Update 2: is probably a cron running during a deploy which causes it somehow, when we disable crons, then deploy and re-enable crons afterwards, it works. Sorry for the noise in this PR, has probably nothing to do with it. |
@kandy please, any response would be appreciated. |
hi, what's the status of this!? it's happening now on two customer sites heavily using catalog rules, @quisse does your fix work?! |
Hi @quisse, could you please look through failed tests? |
@engcom-Charlie Please read previous comment. |
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.
Hi @quisse .
Due to Magento Definition of Done all code must be covered by tests. Please cover your fix by automated test.
Thanks!
Pull Request state was updated. Re-review required.
@magento run Performance Acceptance Tests |
Seems like test failures not related to changes from this PR. Let’s wait a bit and restart tests again |
@magento run Functional Tests B2B, Integration Tests |
@magento run Functional Tests B2B |
Feels like a lottery, isn't it? 🙈😅 |
There were some fixes in related repositories, so tests should be fixed already |
@magento run Functional Tests B2B |
1 similar comment
@magento run Functional Tests B2B |
@quisse could you merge recent changes from 2.4-develop? Maybe that's causing test failures? |
@magento run all tests |
Hi @ihor-sviziev, thank you for the review. |
@engcom-Alfa any updates on testing this PR? |
This change will still leave temporary tables in case Magento hit a PHP memory limit, which is not that hard in Magento landscape. Maybe the indexer should start by cleaning up old tables, instead of doing it in the destructor. |
@stefandoorn, that's actually another use case. From my perspective - this solution is good enough to be tested and merged. If you have a better solution - please send a Pull Request, we'll review it |
Yeah, sorry, wasn't meant to discard this PR. It's indeed another use case to keep in mind :-) |
Hi @quisse, thank you for your contribution! |
Hey @quisse, the Performance team took care of your PR. Thank you for your contribution. |
Description (*)
Make sure temporary tables always get cleaned up, even on faillure.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)