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

[Issue] Fixed table difference insert during price reindex #36482

Closed
5 tasks
m2-assistant bot opened this issue Nov 16, 2022 · 1 comment
Closed
5 tasks

[Issue] Fixed table difference insert during price reindex #36482

m2-assistant bot opened this issue Nov 16, 2022 · 1 comment
Assignees
Labels
Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done

Comments

@m2-assistant
Copy link

m2-assistant bot commented Nov 16, 2022

This issue is automatically created based on existing pull request: #36370: Fixed table difference insert during price reindex


Description (*)

Problem appears when dimensions are not used.
catalog_product_index_price is now incompatible with catalog_product_index_price_tmp as new ID columnt added
https://devdocs.magento.com/guides/v2.4/release-notes/backward-incompatible-changes/reference.html
so method works incorrectly as final query contains additional column

\Magento\Catalog\Model\Indexer\Product\Price\AbstractAction::_syncData

We faced this issue while running graphql tests when indexers is set - update on save
The issue might be skipped in fixtures but when tests are placing the order - it triggers reindex that blocks order placing.

In query logs we may see how temp table is created

## 140 ## QUERY
SQL: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_price_temp` LIKE `catalog_product_index_price_tmp`
AFF: 0
TIME: 0.0008

Related Pull Requests

Fixed Issues (if relevant)

cannot reindex price

Magento\Framework\Exception\LocalizedException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1, query was: INSERT INTO `catalog_product_index_price` SELECT `ip_tmp`.* FROM `catalog_product_index_price_temp` AS `ip_tmp` ON DUPLICATE KEY UPDATE `tax_class_id` = VALUES(`tax_class_id`), `price` = VALUES(`price`), `final_price` = VALUES(`final_price`), `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`), `tier_price` = VALUES(`tier_price`) in /home/www/magento/vendor/magento/module-catalog/Model/Indexer/Product/Price/Action/Row.php on line 32
  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Set indexer update on save
  2. Create product on 2.4.5 installation
  3. Create custom script to reindex
  4. RUN Magento\Catalog\Model\Indexer\Product\Price::executeRow
  5. See error.
  6. Apply patch from this PR
  7. retry reindex - no error

Questions or comments

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Nov 16, 2022
@m2-community-project m2-community-project bot added this to Pull Request In Progress in High Priority Backlog Nov 16, 2022
@engcom-Hotel
Copy link
Contributor

Duplicate of #36471

@engcom-Hotel engcom-Hotel marked this as a duplicate of #36471 Dec 21, 2022
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done
Projects
Development

No branches or pull requests

2 participants