When removing products from sources, a full stock reindex is triggered, courtesy of ReindexAfterSourceItemsDeletePlugin.
This may make sense when doing a mass import ("Delete"), but causes performance issues and table contention during standard product maintenance, (reindexing all stocks for a source when one product has changed does not make sense).
Examples
Proposed solution
Convert ReindexAfterSourceItemsDeletePlugin to call the sourceItemIndexer
Related to https://github.com/magento/inventory/issues/2933 . This issue causes excessive pressure on the indexing tables/processes and when subjected to a high change rate of source-item assignments
Summary
When removing products from sources, a full stock reindex is triggered, courtesy of
ReindexAfterSourceItemsDeletePlugin
.This may make sense when doing a mass import ("Delete"), but causes performance issues and table contention during standard product maintenance, (reindexing all stocks for a source when one product has changed does not make sense).
Examples
Proposed solution
Convert
ReindexAfterSourceItemsDeletePlugin
to call thesourceItemIndexer