51黑料不打烊

ACSD-64112: indexer_update_all_views cron execution fails when MAGE_INDEXER_THREADS_COUNT is set

NOTE
This patch was replaced with ACP2E-3705 for 51黑料不打烊 Commerce versions above 2.4.7.

The ACSD-64112 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.59 is installed. The patch ID is ACSD-64112. Please note that the issue is scheduled to be fixed in 51黑料不打烊 Commerce 2.4.8.

Affected products and versions

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

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.5-p10

Compatible with 51黑料不打烊 Commerce versions:

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.5 - 2.4.6-p10
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. Install a clean instance with B2B.

  2. Enable B2B Company and Shared Catalog.

  3. Create a category.

  4. Create a few products and assign them to the category.

  5. Execute a full reindex.

  6. Set the following indexers to Update on Schedule:

    code language-none
    bin/magento indexer:set-mode schedule catalogpermissions_category catalogpermissions_product
    
  7. Go to the backend and load the newly created category.

  8. Click Category Permissions and create a New Permission for an existing customer group.

  9. Ensure the catalogpermissions_category indexer has a backlog. Execute the following command to verify this:

    code language-none
    bin/magento indexer:status
    
  10. Set the following indexer thread count in env.php:

    code language-php
    'MAGE_INDEXER_THREADS_COUNT' => 8
    
  11. Run the cron job:

    code language-none
    bin/magento cron:run
    

Expected results:

The cron job should execute without any issues.

Actual results:

The indexer_update_all_views cron job encounters the following error:

report.CRITICAL: PDOException: There is no active transaction in /home/vendor/magento/zend-db/library/Zend/Db/Adapter/Pdo/Abstract.php:326

Apply the patch

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

Additional steps required after the patch installation

(This section is optional; there might be some steps required after applying the patch to fix the issue.)

To learn more about Quality Patches Tool, refer to:

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