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

[Forwardport] Use batches and direct queries to fix sales address upgrade #20785

Conversation

ihor-sviziev
Copy link
Contributor

Description (*)

This is forwardport of #19098 to 2.3-develop

Magento Commerce compatible fix for sales address upgrade script.

Fixed Issues (if relevant)

  1. [update] enhance performance on large catalog #16570: enhance performance on large catalog (comment)
  2. 2.2.6 Use batches and direct queries to fix sales address upgrade #18945

Manual testing scenarios (*)

Magento Commerce compatible fix for sales address upgrade script.

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)

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. 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.3-develop instance - deploy vanilla Magento instance

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

@ihor-sviziev
Copy link
Contributor Author

Hi,
I did the same changes as in #19098, that I really tested, wanted to approve, but fix for 2.3-develop should be merged first.

@slavvka slavvka self-assigned this Jan 31, 2019
@magento-engcom-team
Copy link
Contributor

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

@p-bystritsky p-bystritsky self-assigned this Mar 5, 2019
@p-bystritsky p-bystritsky force-pushed the 2.3-performance_sales_address_upgrade branch from 124aac1 to 53bbfd2 Compare March 11, 2019 15:25
@p-bystritsky
Copy link
Contributor

@ihor-sviziev there is not such column as "orderAddressId" in "sales_order_address" table, used in 'where' clause in https://github.com/magento/magento2/pull/19098/files#diff-0815805b2d40fcf0d22ebd639e0d73c4R247. Which will lead to an error during update.

'quote_address_id' => $quoteAddresses[$orderAddress['quote_id']]['address_id'] ?? null,
];
$where = [
'orderAddressId' => $orderAddress['entity_id']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'orderAddressId' => $orderAddress['entity_id']
'entity_id' => $orderAddress['entity_id']

@ghost ghost assigned ihor-sviziev Mar 12, 2019
@ihor-sviziev
Copy link
Contributor Author

As we discussed with @p-bystritsky in slack - change with entity_id fixed SQL error, but in general - data is incorrect. Need to re-check.

@ihor-sviziev
Copy link
Contributor Author

ihor-sviziev commented Mar 12, 2019

Hi @p-bystritsky,
I found & fixed root of the issue. Please re-check it. Also added the same change to backport in 2.2-develop branch.
Thank you!

@ghost ghost added the Progress: accept label Mar 13, 2019
@magento-engcom-team magento-engcom-team merged commit d3482b7 into magento:2.3-develop Mar 16, 2019
@ghost
Copy link

ghost commented Mar 16, 2019

Hi @ihor-sviziev, 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.

5 participants