Skip to content
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

Fix for update products via csv file (fix for 22028) #22902

Merged
merged 1 commit into from
May 27, 2019
Merged

Fix for update products via csv file (fix for 22028) #22902

merged 1 commit into from
May 27, 2019

Conversation

mtwegrzycki
Copy link
Contributor

@mtwegrzycki mtwegrzycki commented May 15, 2019

Description (*)

It is backport pull request related to #22575 PR (on Magento 2.3)
It is fix for issue #22028

In query for selecting ids to indexing after import products, I changed "between" into "in",
Before change, when products were updated via csv file import in Admin panel, to indexing process were selected all products from range between the smallest and the biggest products id from csv file. When the ids were from wide range, it caused selecting a huge amount of data and attempt to inserting them to catalog_product_index_price_temp. If data amount was to big, it caused error
After change, for indexing process are selected only products from csv file.

Example:
Before change, when we try to update two products with id 30 and 31, only two products were selected to indexing.
When products have ids 30 and 50, it caused, that 21 products were selected to indexing (All products with ids between 30 and 50.

After change, in both cases described above, only two products will be selected to indexing.

Fixed Issues (if relevant)

No related issues found.

Manual testing scenarios (*)

The same scenario can be applied to reproduce bug and check fix:

  1. Prepare csv file to update products (2 products or more). (This csv should contain products with the lowest and the highest id - 1 and 6000)
  2. In Admin panel go to: System->Import and choose Product and Add/Update
  3. Upload file
  4. Check Data
  5. Import csv file (error should be displayed now)

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented May 15, 2019

Hi @mtwegrzycki. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@mtwegrzycki
Copy link
Contributor Author

Hi @orlangur , I marked you in comment, because you know this case from PR for Magento 2.3 version.

@rogyar rogyar self-assigned this May 18, 2019
@mtwegrzycki
Copy link
Contributor Author

Please, let me know, if any additional actions from me are required.

@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-5165 has been created to process this Pull Request

@soleksii
Copy link

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented May 27, 2019

Hi @mtwegrzycki, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants