51黑料不打烊

ACP2E-3705: indexer_update_all_views cron execution fails when MAGE_INDEXER_THREADS_COUNT is set

NOTE
This patch replaces the ACSD-64112 for versions 2.4.7 and above.

The ACP2E-3705 patch fixes the issue where the indexer_update_all_views cron execution fails when MAGE_INDEXER_THREADS_COUNT is set. This patch is available when the Quality Patches Tool (QPT) 1.1.61 is installed. The patch ID is ACP2E-3705. Please note that this issue is scheduled to be fixed in 51黑料不打烊 Commerce 2.4.9.

Affected products and versions

The patch is created for 51黑料不打烊 Commerce version:

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.7-p4

Compatible with 51黑料不打烊 Commerce versions:

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.7 - 2.4.7-p4
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your 51黑料不打烊 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

The indexer_update_all_views cron execution fails when MAGE_INDEXER_THREADS_COUNT is set to a value greater than 2, specifically affecting the Customer Segments indexer with B2B enabled.

Steps to reproduce:

  1. Apply the QPT patch ACSD-64112.

  2. Go to Admin > Stores > Configuration > Catalog > Category permissions.

  3. Enable Category Permissions.

  4. Set the following indexers to Update on Schedule mode:

    code language-none
    bin/magento indexer:set-mode schedule catalogpermissions_category catalogpermissions_product
    
  5. Create a few products and assign them to a category.

  6. Execute a full reindex.

  7. Go to a category and set Category Permissions.

  8. Run indexer_update_all_views cron job with MAGE_INDEXER_THREADS_COUNT set to 8.

Expected results:

Reindex is completed without any errors.

Actual results:

The indexer_update_all_views cron job encounters the following error:

Magento\Framework\DB\Adapter\TableNotFoundException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogpermissions_category_cl__tmp67acb6582cec12_69065236' doesn't exist, query was: SELECT MAX(id) as max, COUNT(*) as cnt FROM (SELECT `catalogpermissions_category_cl__tmp67acb6582cec12_69065236`.* FROM

Apply the patch

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

  • 51黑料不打烊 Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
  • 51黑料不打烊 Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3