ACSD-49973: Improved performance fetching bundled products via GraphQL

The ACSD-49973 patch improves performance fetching bundled products via GraphQL. This patch is available when the Quality Patches Tool (QPT) 1.1.30 is installed. The patch ID is ACSD-49973. Please note that the issue is fixed in Adobe Commerce 2.4.7.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.4-p2

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.4-p3
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

Performance degradation occurs when fetching bundled products via GraphQL.

Prerequisites:

Create 2000 bundle products using the Performance toolkit.

Steps to reproduce:

  1. Enable the DB query logger:

    code language-none
    bin/magento dev:query-log:enable
    
  2. Execute the following GraphQL query:

    code language-graphql
    {
      products(
        search: "bundle"
        pageSize: 2000,
        sort: { relevance: DESC }
      ) {
        total_count
        items {
          name
          sku
        }
      }
    }
    
  3. Check var/log/db.log for requests to the catalog_product_bundle_selection table.

Expected results:

Requests to the catalog_product_bundle_selection table should not be present in the var/log/db.log.

Actual results:

There are 2000 requests to catalog_product_bundle_selection table which are triggered at the same time, which cause performance degradation.

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 Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

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