MDVA-40550: Products missing on the frontend after reindexing

The MDVA-40550 patch solves the issue where reindexing results in some or all of storefront categories missing products. This patch is available when the Quality Patches Tool (QPT) 1.1.6 is installed. The patch ID is MDVA-40550. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.4.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.2-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.3.5 - 2.4.3-p1
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Steps to reproduce:

  1. Create a product.

  2. Switch indexers to Update by schedule.

    • Assign the product to a category.
  3. Enable xdebug and make xdebug breakpoint in \Magento\Indexer\Model\Indexer::reindexAll and \Magento\Indexer\Model\IndexMutex::execute.

  4. Run a full reindex of catalog_category_product with the command:

    code language-bash
    bin/magento indexer:reindex catalog_category_product
    
    • Wait for the execution to stop on the breakpoint \Magento\Indexer\Model\Indexer::reindexAll.
  5. In another console, run a partial reindex in parallel with the command:

    code language-bash
    bin/magento cron:run --group=index --bootstrap=standaloneProcessStarted=1
    
  6. Wait for the execution to stop on the breakpoint \Magento\Indexer\Model\IndexMutex::execute. It will lock the catalog_category_product indexer.

  7. Resume execution of the full reindex of catalog_category_product and wait for a lock timeout (60 seconds).

Expected results:

No error messages in console.

Actual results:

You get the following error:

Could not acquire lock for index: catalog_category_product.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a