-
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
[Backport] catalog:images:resize total images count calculates incorrectly #18387 #18809
[Backport] catalog:images:resize total images count calculates incorrectly #18387 #18809
Conversation
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)
Hi @vpodorozh. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style; (cherry picked from commit 466daaa)
…rectly magento#18387: magento#18807 (cherry picked from commit e1a1c7b)
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); (cherry picked from commit f6b0a2a)
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); (cherry picked from commit 546e7ce)
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - remove method return type 'void' which can be used in php7.1 or higher.
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue Ranged selects always miss the last range Fix unit test. 11 batches expected to handle 105 items: 1: 1-10 2: 11-20 3: 21-30 4: 31-40 5: 41-50 6: 51-60 7: 61-70 8: 71-80 9: 81-90 10: 91-100 11: 101-105 (cherry picked from commit 6c24c0e)
@duhon - The other Bug is present in 2.2-develop branch related to the current issue, check #18387 (comment) (I've updated PR description) This issue #12624 has fixed problem with "Ranged selects always miss the last range" in 2.3-develop branch, however, backport to 2.2-develop branch was not made. So I've made it in the scope of current PR #18809 - you can check the fix here 76bd089 . Could you please review my changes one more time? |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style;
…rrectly magento#18387: magento#18807 (cherry picked from commit f38a4fc)
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style; (cherry picked from commit c95ce3c)
Hi @vpodorozh, thank you for your contribution! |
Original pull request (#18807)
Description (#18387)
Assumption from issue: >>"catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue".
However, there is a problem with total images count calculation select (distinct by image path is not used in
count(*)
) - functionality by itself works correctly and process all images.Fixed Issues
#18387: catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue
getCountAllProductImages
method that calculates total images count incorrectly;\Magento\Catalog\Model\ResourceModel\Product\Image
with unit tests;UPD from 27.10.2018:
3. Ranged selects always miss the last range - [backport] of #12624
Manual testing scenarios
Variant I
Expected result
You do see total images count 801.
Actual result
You do see total images count 3422.
Variant II (synthetic case)
php bin/magento setup:performance:generate-fixtures setup/performance-toolkit/profiles/ce/medium.xml
For details check
catalog_product_entity_media_gallery
table.example SQL to do this:
create temporary table zzz as (select NULL as value_id, c.attribute_id, c.value, c.media_type, c.disabled from catalog_product_entity_media_gallery as c); insert into catalog_product_entity_media_gallery select * from zzz;
Expected result
Total images count will be equal to the value from
setup/performance-toolkit/profiles/ce/medium.xml
inimages-count
node ( 1000 ).Actual result
Total images count will be 2 times higher that their exact value.
Contribution checklist (*)