-
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
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue #18387
Comments
Hi @gwharton. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @gwharton do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Can't use engcom test instances as need terminal and sample data. However 100% reproducable using above steps on newly deployed 2.3-develop from git, and 2.2.6 existing installs (two 2.2.6 deployments both show same issue) |
#squashtoberfest |
Hi @Fazzke. Thank you for working on this issue.
|
@magento-engcom-team give me 2.2-develop instance |
Hi @Fazzke. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @Fazzke, here is your Magento instance. |
Hi @vpodorozh. Thank you for working on this issue.
|
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix getCountAllProductImages select and cover class with unit tests.
@gwharton - all your images are processed correctly. So, in case you will execute the next SQL: I've fixed total images calculation my PR. |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix getCountAllProductImages select and cover class with unit tests. (cherry picked from commit 6a6079d)
Something doesnt sound right to me there. I have 139 images in my pub/media/catalog/product folder
|
Seems to be two issues here as if I do it on a clean 2.2-develop with sample data installed.
I'm willing to accept that there are two images in the pub/media folder that don't correspond to an entry in the database which exlpains the discrepancy between 723 and 725. 723 being the number of images correctly configured. The images resize command wrongly calculates the total as 3422 which looks like the issue you are fixing with your PR's. The image resize command also stops at 700 which is a separate bug. This second problem seems to be related to the batching with the batchSelectIterator inside the getAllProductImages() call of /app/code/Magento/Catalog/Model/ResourceModel/Product/Image.php The default batch size is 100, and it looks like it doesnt process the last batch. So in my first example it processes the first 100, then skips the last 39. And in my second example it processes the first (7*100) and then skips the last 23. |
Perhaps this second bug is not present in 2.3-develop as if you run the same on that, you get 801 images processed of 801 images configured (albeit reporting that there are 3422 images in total (total fixed by your PR)) |
@gwharton - thank you for your response and explanations. |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style;
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix unit test - now it can test also not only full batches, but partial as well (139 images with batch size 100);
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix unit test - now it can test also not only full batches, but partial as well (139 images with batch size 100);
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style; (cherry picked from commit 466daaa)
Hi @TomashKhamlai. Thank you for working on this issue.
|
Hi @gwharton , thank you for you report, this issue has already fixed in 2.3-develop branch, and will be available on 2.3.1 release. |
Hi @gwharton. Thank you for your report.
The fix will be available with the upcoming 2.2.8 release. |
Preconditions
Steps to reproduce
Expected result
Actual result
In my 2.2.6 development store which has 140 images, it always stops after exactly 100.
I can reproduce this issue on both 2.3-develop and 2.2.6.
Possible underlying Magento/Framework/DB/Query/Generator issue.
The text was updated successfully, but these errors were encountered: