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
[2.3] Correct flat indexing with staging and > 500 cats #12345
Conversation
Previously, the array was prefilled with entity_id values to ensure those categories were indexed. Unfortunately, when using row_id, it was using entity_ids. When chunking at 500, this could cause an overlapping row to be processed twice (the second time with missing non-static attributes), and cause a duplicate key error.
This keeps full and rows indexing consistent.
@toddbc These changes need to be updated as cause an integration test failure which is not part of Travis CI builds (executed by inhouse CI envirotnment):
|
Thanks for catching that - updated. Is there a way for me to run that same test, or is it supposed to work with EE linked? I must be doing something wrong - |
@toddbc I reproduced these test failures locally by running single integration test as described at DevDocs (CE+EE installation).
Your last commit fixes an the failure. |
Description
In a past change, entity_id was used for mapping. However, since the index stores things by entity id (not link id), this prevents it from selecting the correct row.
Additionally, there was a spurious
$categoryAttributesData = [];
inbuildCategoryIndexData()
which looks like a mistake, so the argument was ignored.Please see magento-partners/magento2ce#65 for more detail with regard to Magento Commerce.
Manual testing scenarios
For Magento Open Source:
Expected results:
Reindex runs successfully. All rows have correct updates.
Actual results:
Data may not update properly.
Please see magento-partners/magento2ce#65 for the Magento Commerce test scenario.
Contribution checklist