ÃÛ¶¹ÊÓÆµ

[PaaS only]{class="badge informative" title="Applies to ÃÛ¶¹ÊÓÆµ Commerce on Cloud projects (ÃÛ¶¹ÊÓÆµ-managed PaaS infrastructure) and on-premises projects only."}

ACSD-64118: Concurrent product save requests for same product cause data inconsistency and duplicate entries

The ACSD-64118 patch fixes the issue where concurrent requests to save and update the same product result in data inconsistency or duplicated products. This patch is available when the Quality Patches Tool (QPT) 1.1.65 is installed. The patch ID is ACSD-64118. Please note that this issue is scheduled to be fixed in ÃÛ¶¹ÊÓÆµ Commerce 2.4.9.

Affected products and versions

The patch is created for ÃÛ¶¹ÊÓÆµ Commerce version:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.5-p7

Compatible with ÃÛ¶¹ÊÓÆµ Commerce versions:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.4 - 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 ÃÛ¶¹ÊÓÆµ 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

Concurrent requests to save and update the same product result in data inconsistency or duplicated products.

Steps to reproduce:

  1. Set up multi-process for consumers in env.php:

    code language-none
    'multiple_processes' =>
        array (
            'async.operations.all' => 4,
        ),
    
  2. Add an additional store and a new storeview to the main website.

  3. Send a bulk API request to the default storeview endpoint /rest/default/async/bulk/V1/products with the following payload to create a product:

    code language-none
    [
      {
        "product": {
          "sku": "Test_Prod",
          "name": "Test Product",
          "attribute_set_id": 4
        }
      }
    ]
    
  4. Use the same payload to send a bulk API request to the new storeview endpoint /rest/store/async/bulk/V1/products to update the product.

  5. Flush cache.

  6. Run cron jobs.

  7. Check the catalog_product_entity table for entries of the product from the previous steps.

Expected results:

  • A single entry for the product SKU should be present in the catalog_product_entity table.
  • The first REST API request should create one database entry, and all subsequent requests should update that database entry.

Actual results:

Multiple entries for the same SKU are present in the catalog_product_entity table.

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:

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