Skip to content

Initializing the record transformer before the loop #778

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

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

DmitryFurs
Copy link
Contributor

Description

When migrating data in the EAV Step, the record transformer instance is initialized inside the records loop. This leads to the fact that for each record transformer, new instances of handlers are initialized. Since some handlers make a query to the db and store the result in their properties, it turns out that each new handler instance will execute this query.

A similar issue is present in the Tier Price Step, only the record transformer is initialized inside the pages loop.

Manual testing scenarios

  1. Add breakpoint at \Migration\Handler\EavAttribute\ApplyTo::checkIfUserDefined() this handler will transform catalog_eav_attribute.apply_to field
  2. Run migrating of the EAV Step
  3. Catch multiple duplicate unnecessary queries to the db per table transformation

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)

@DmitryFurs DmitryFurs changed the title DMT-5 Initializing the record transformer before the loop Initializing the record transformer before the loop Jan 25, 2020
@victor-v-rad
Copy link
Collaborator

Hi @DmitryFurs

Thank you for your contribution to the project! Internal ticket MC-30836 to process the PR

@victor-v-rad victor-v-rad merged commit c636d69 into magento:2.3-develop Feb 3, 2020
@ghost
Copy link

ghost commented Feb 3, 2020

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

@DmitryFurs DmitryFurs deleted the DMT-5 branch September 24, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants