{"data":{"id":"ACP2E-4603","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where running the Catalog Permissions product reindex left existing permission index rows unchanged, causing updated category permission grants to not be reliably reflected on products.","categories":["Catalog/Product"],"components":["magento/module-catalog-permissions"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-79/acp2e-4603","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-79/acp2e-4603.md","blobSha":"6af8998cc4fa51c0607ea2d3beb5a3303663c8c4","description":"Catalog Permissions product reindexing leaves existing permission index rows unchanged, so updated category permission grants don't reflect correctly on products.","stepsToReproduce":"1. Enable Category Permissions: 1. Log in to the Admin. 1. Go to Stores > Configuration. 1. Under Catalog, select Catalog. 1. Expand Category Permissions. 1. Set Enable to Yes. 1. Save the Configuration. 1. Create 50 or more customer groups (Option A or Option B): 1. Option A — Admin: Go to Customers > Customer Groups and select Add New. Enter a group name (for example, ACSD70034_01) and select the default tax class, then Save. Repeat to create 50 or more groups. 1. Option B (recommended) — REST API: Send a POST request to /rest/V1/customerGroups with the request body {\"group\":{\"code\":\"ACSD70034_01\",\"taxClassId\":0}}. Repeat to create 50 groups (ACSD70034_01 through ACSD70034_50). 1. Add category permissions in Admin: 1. Go to Catalog > Categories. 1. Edit 10–20 or more categories to increase reproducibility. 1. In each category, scroll to Category Permissions and select Add Permission. 1. Select a website (for example, Main Website) and assign one of the previously created customer groups. 1. Configure Grant Catalog Category View, Grant Product Price, and Grant Checkout as required. 1. Select Save. 1. Recommended scale: Create a larger data set (for example, 20 categories and 20–50 customer groups) to generate 400–1,000 permission rows. 1. Ensure a single index table (default): 1. Go to Stores > Configuration > Catalog > Catalog > Category Permissions. 1. If Dimensions or Indexer Dimensions appears, set it to None (not Customer Group) to use a single index table. 1. Run reindex with parallel threads from the CLI: 1. Export MAGE_INDEXER_THREADS_COUNT=4. 1. Run php bin/magento indexer:reset catalogpermissions_category catalogpermissions_product. 1. Run php bin/magento indexer:reindex catalogpermissions_category catalogpermissions_product. 1. Repeat the reset and reindex commands 5–10 times to reproduce the deadlock during parallel execution.","introducedInQpt":"1.1.79","createdFor":["2.4.7-p3"],"documentedRange":"2.4.6 - 2.4.7-p9","scheduledFixRelease":"2.4.9"},"files":[{"package":"magento/magento2-ee-base","constraint":">=2.4.6 <2.4.6-p15 || >=2.4.7 <2.4.7-p10","path":"patches/commerce/ACP2E-4604_2.4.7-p3.patch","blobSha":"ed11d33c63bb987902fd0d65ee48afa26f3d6dcf","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/commerce/ACP2E-4604_2.4.7-p3.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-catalog-permissions/Model/Indexer/AbstractAction.php","change":"modified","package":"magento/module-catalog-permissions"},{"path":"vendor/magento/module-catalog-permissions/Model/Indexer/Product/IndexFiller.php","change":"modified","package":"magento/module-catalog-permissions"},{"path":"vendor/magento/module-catalog-permissions/Model/Indexer/RetryConfiguration.php","change":"added","package":"magento/module-catalog-permissions"},{"path":"vendor/magento/module-catalog-permissions/Model/Indexer/RetryConfigurationInterface.php","change":"added","package":"magento/module-catalog-permissions"},{"path":"vendor/magento/module-catalog-permissions/Model/ResourceModel/Permission/Index.php","change":"modified","package":"magento/module-catalog-permissions"},{"path":"vendor/magento/module-catalog-permissions/etc/di.xml","change":"modified","package":"magento/module-catalog-permissions"}],"packages":["magento/module-catalog-permissions"],"hasTests":false,"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6"],"mage-os":[]},"unknownVersions":[],"requires":["ACSD-67603"],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6"],"mage-os":[]},"conditions":{"and":[{"type":"log","path":"var/log/exception.log","match":"*Child process failed with message: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT*INTO `magento_catalogpermissions_*"}]},"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACP2E-4603 details"}