bestsellers monthly and yearly Tables Keep growing due to website deletion #36481
Open
Description
Preconditions (*)
- Magento 2.4.3-p1 | Magento 2.4.5-p1, 2.4-develop
- Multi-Store Setup
Steps to reproduce (*)
- Place an order in a Multi-Store (both websites)
- Delete the 2nd website. (Admin - Stores - All Stores - Open Website and delete)
- Reindex and flush cache
- Refresh Bestsellers Statistics (Refresh Lifetime Statistics / Refresh Statistics for the Last Day) .
(Reports - Products - Best Sellers - Click on refresh Statistics link - Select Best Sellers checkbox - Refresh - Submit) - Verify DB tables: sales_bestsellers_aggregated_monthly and sales_bestsellers_aggregated_yearly tables
- Select Best Sellers again and refresh
- Verify Db tables
Expected result (*)
- sales_bestsellers_aggregated_monthly and sales_bestsellers_aggregated_yearly tables not to add new entries every time Refresh Bestsellers Statistics (Including the Cron)
Actual result (*)
- sales_bestsellers_aggregated_monthly and sales_bestsellers_aggregated_yearly tables add new entries every time Refresh Bestsellers Statistics (Including the Cron)
When you have 100,000 orders on the deleted website, this become the real issue.
Metadata
Assignees
Labels
Type
Projects
Status
Pull Request In Progress