`ReindexAfterSourceItemsDeletePlugin` triggers a full stock reindex for a single source removal
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
### 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 the `sourceItemIndexer`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReindexAfterSourceItemsDeletePlugin and inspect how it currently triggers stock reindexing. Then trace the sourceItemIndexer entry point named in the proposal. Done means a single source-item removal uses the targeted indexer instead of triggering a full stock reindex; no test file is mentioned, so identify the relevant coverage while tracing the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100