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

Fix Performance Degradation in StockItem Indexation #91

Closed
naydav opened this issue Sep 13, 2017 · 0 comments
Closed

Fix Performance Degradation in StockItem Indexation #91

naydav opened this issue Sep 13, 2017 · 0 comments
Assignees

Comments

@naydav
Copy link

naydav commented Sep 13, 2017

Several improvements need to be done for current indexation mechanism. As currently, we have a performance issue which leads to the whole re-indexation when any changes in SourceItem Qty happened (which is wrong).

1) Currently inventory_source_item table is used in mview configuration.
https://github.com/magento-engcom/magento2/blob/develop/app/code/Magento/Inventory/etc/mview.xml#L11
And system observes for source_id column.

But expected behavior should be an observation of source_item_id column. So our algorithm for \Magento\Inventory\Indexer\StockItem\StockItem::executeList should be like

  1. Obtain list of source_item_id
  2. Filter this list. We need to remove items which are related to disabled sources, and items with out_of_stock status
  3. Get index data only for these SKU that are related to source_item_id list after filtering
  4. Update index data via multiple insert on update
    Now our behavior (get stocks, after that get sources) looks is familiar to full reindex

2) Also we need to track changes in the inventory_source_stock_link table. In this case, we will work with source_id list. So maybe we need to create separate index processor which will be work with source_id.

@maghamed maghamed changed the title Indexation mechanism adaptation Fix Performance Degradation in StockItem Indexation Sep 13, 2017
larsroettig pushed a commit that referenced this issue Sep 30, 2017
- phpcs fixes
- phpunit fixes
larsroettig pushed a commit that referenced this issue Sep 30, 2017
- phpcs fixes
- phpunit fixes
larsroettig pushed a commit that referenced this issue Oct 1, 2017
- fixes for truncate table
- Refactoring for complex array to domain model
larsroettig pushed a commit that referenced this issue Oct 1, 2017
maghamed added a commit that referenced this issue Oct 1, 2017
@maghamed maghamed closed this as completed Oct 5, 2017
magento-cicd2 pushed a commit that referenced this issue Mar 23, 2021
MC-41122: Inventory reservation compensation does not handle partial …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants