Skip to content

bestsellers monthly and yearly Tables Keep growing due to website deletion #36481

Open
@WebHostingAce

Description

Preconditions (*)

  1. Magento 2.4.3-p1 | Magento 2.4.5-p1, 2.4-develop
  2. Multi-Store Setup

Steps to reproduce (*)

  1. Place an order in a Multi-Store (both websites)
  2. Delete the 2nd website. (Admin - Stores - All Stores - Open Website and delete)
  3. Reindex and flush cache
  4. 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)
  5. Verify DB tables: sales_bestsellers_aggregated_monthly and sales_bestsellers_aggregated_yearly tables
  6. Select Best Sellers again and refresh
  7. Verify Db tables

Expected result (*)

  1. 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 (*)

  1. sales_bestsellers_aggregated_monthly and sales_bestsellers_aggregated_yearly tables add new entries every time Refresh Bestsellers Statistics (Including the Cron)

Firefox_Screenshot_2022-11-15T13-33-02 122Z

When you have 100,000 orders on the deleted website, this become the real issue.

Metadata

Assignees

Type

No type

Projects

  • Status

    Pull Request In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions