Skip to content

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

Merged
magento-engcom-team merged 4 commits into
magento:2.3-developfrom
ihor-sviziev:2.3-performance_sales_address_upgrade
Mar 16, 2019
Merged

magento-engcom-team merged 4 commits into
magento:2.3-developfrom
ihor-sviziev:2.3-performance_sales_address_upgrade

Conversation

@ihor-sviziev

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

ihor-sviziev commented Mar 12, 2019

Copy link
Copy Markdown
Contributor Author

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

ghost commented Mar 16, 2019

Copy link
Copy Markdown

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.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.2 milestone Mar 16, 2019
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
…s address upgrade magento#20785

 - Merge Pull Request magento#20785 from ihor-sviziev/magento2:2.3-performance_sales_address_upgrade
 - Merged commits:
   1. 70fb3da
   2. 53bbfd2
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
…s address upgrade magento#20785

 - Merge Pull Request magento#20785 from ihor-sviziev/magento2:2.3-performance_sales_address_upgrade
 - Merged commits:
   1. 70fb3da
   2. 53bbfd2
   3. 649fad6
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
…s address upgrade magento#20785

 - Merge Pull Request magento#20785 from ihor-sviziev/magento2:2.3-performance_sales_address_upgrade
 - Merged commits:
   1. 70fb3da
   2. 53bbfd2
   3. 649fad6
   4. d3482b7
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
Accepted Public Pull Requests:
 - magento#21713: Resolve Issue : Search REST API returns wrong total_count (by @ronak2ram)
 - magento#20512: Sorting by Websites not working in product grid in backoffice magento#20511 (by @XxXgeoXxX)
 - magento#20840: Missed form validation in Admin Order Address Edit route sales/order/address (by @XxXgeoXxX)
 - magento#20785: [Forwardport] Use batches and direct queries to fix sales address upgrade (by @ihor-sviziev)
 - magento#19859: MUI controller lacks JSON response, instead returns status 200 with empty body (by @woutersamaey)


Fixed GitHub Issues:
 - magento#17295: Search REST API returns wrong total_count (reported by @mohamed-karam) has been fixed in magento#21713 by @ronak2ram in 2.3-develop branch
   Related commits:
     1. 7c55811
     2. a546e14
     3. 9dc26cc

 - magento#20511: Sorting by 'Websites' not working in product grid in backoffice (reported by @KiraLis) has been fixed in magento#20512 by @XxXgeoXxX in 2.3-develop branch
   Related commits:
     1. 0dfe0f0
     2. e61b399
     3. fa49579
     4. 8170bd7
     5. f4d1442
     6. 93da772
     7. 5362c5a
     8. f57e5e8
     9. a6f266d
     10. a32d27b
     11. c76d248

 - magento#19360: Missed form validation in Admin Order Address Edit route sales/order/address (reported by @ilnytskyi) has been fixed in magento#20840 by @XxXgeoXxX in 2.3-develop branch
   Related commits:
     1. 54469ce
     2. 464e981
     3. 7b8e969
     4. fd4ed41
     5. 7d6cca6
     6. 8b99ea2
     7. 5867a48
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.

6 participants