Skip to content

Avoid unnecessary setData when the data is already set from controller and avoid triggering 2 select queries during product import #39767

Open
@senthilengg

Description

@senthilengg

Preconditions and environment

  • Reproducible in all versions
  • Below line of code firing 2 select queries one after another to the importexport_importdata table which seems to be totally unnecessary when the data is already set from the Controller Magento\ImportExport\Controller\Adminhtml\Import\Start

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/ImportExport/Model/Import.php#L526C9-L527C84

Steps to reproduce

  1. Enable Db log or add log in this function
    public function getUniqueColumnDataWithIds($code, $ids = null)
  2. Import product data from admin
  3. You can find 2 select queries to importexport_importdata table one after the another

Expected result

No select queries should be fired since its unnecessary

Actual result

2 select queries getting fired

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Import / exportComponent: DBIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions