-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 20956: Batch deletion of orphaned product rows in catalog sync
## What's being changed There's a step at the start of catalog sync where we scan the `email_catalog` table and check whether the `product_id` matches an `entity_id` in `catalog_product_entity`, deleting from `email_catalog` if we can't find a match. This step is being optimised using batching. ## Why it's being changed For merchants with large data sets, the delete query can cause SQL locking. ## How to review / test this change - Delete a number of rows manually from `catalog_product_entity`, from different points e.g. delete entity ids 200 and 700 - Run catalog sync - Ensure the deleted product ids are also removed from email_catalog Related work items: #113976
- Loading branch information
Showing
1 changed file
with
47 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters