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

MSI-2210: Price Indexer fails with large catalogs #2336

Merged

Conversation

Stepa4man
Copy link
Contributor

Fixed Issues

  1. Price Indexer fails with large catalogs #2210: Price Indexer fails with large catalogs

Manual testing scenarios

Described in issue

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)

@larsroettig
Copy link
Member

@Stepa4man you need also sign the new CLA best regards,

@Stepa4man
Copy link
Contributor Author

@Stepa4man you need also sign the new CLA best regards,

@larsroettig licence/cla's will be imported from the old MSI project.

@ishakhsuvarov
Copy link
Contributor

@Stepa4man @larsroettig Thank you for your patience. CLA signatures were now transferred from the old repository and updated accordingly.

@@ -84,7 +94,7 @@ public function aroundModifyPrice(
$select->from(['price_index' => $priceTable->getTableName()], []);
$priceEntityField = $priceTable->getEntityField();

if ($this->resourceConnection->getConnection()->isTableExists($stockTable)) {
if (!$this->isDefaultStock($stock) && $this->resourceConnection->getConnection()->isTableExists($stockTable)) {
$select->joinInner(
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this join should remain regardless of stock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ishakhsuvarov This join was done for getting SKU from catalog_product_entity and using it for joining inventory_stock_% table because it doesn't have product_id.
We don't need sku if we use cataloginventory_stock_status because it has product_id
Do you see any other reason?

$select->joinLeft(
['stock_status' => $legacyStockTableName],
sprintf(
'stock_status.product_id = price_index.%s and stock_status.website_id = %d',
Copy link
Contributor

Choose a reason for hiding this comment

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

Website ID is also added later. Should we just join on sku in inventory and product?

@Stepa4man Stepa4man added the Kharkiv2019 Contribution day in Kharkiv June 2019 label Jun 22, 2019
ishakhsuvarov added a commit that referenced this pull request Nov 22, 2019
…th-large-catalogs

MSI-2210: Price Indexer fails with large catalogs
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