{"data":{"id":"ACSD-48448","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where there is a race condition issue happening during the order cancellations, which cause duplicated entry in the inventory_reservation table.","categories":["Order/Checkout","Inventory"],"components":["magento/module-sales"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-34/acsd-48448-race-condition-issue-happening-during-order-cancellations","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-34/acsd-48448-race-condition-issue-happening-during-order-cancellations.md","blobSha":"14472a7d2bef2da4abc611bd247e7e7ffeb58473","description":"Race condition issue is happening during order cancellations, which causes duplicated entries in the inventory_reservation table.","stepsToReproduce":"1. Place an order. 1. Check the inventory_reservation table to make sure there is a record for the order_placed event. 1. Run the attached script to cancel the order in parallel (remember to change the URL and orderID). bash cancel_order.sh #!/bin/bash baseUrl=\" \" orderId=3 token=$(curl --location --request POST \"${baseUrl}rest/V1/integration/admin/token\" \\ -H 'Content-Type: application/json' \\ -d '{ \"username\": \"admin\", \"password\": \"password\" }') echo ${token//\\\"/} curl --location --request POST \"${baseUrl}/rest/V1/orders/${orderId}/cancel\" \\ -H \"Authorization:Bearer ${token//\\\"/}\" \\ -H 'Content-Type: application/json' \\ & sleep 0.1; curl --location --request POST \"${baseUrl}/rest/V1/orders/${orderId}/cancel\" \\ -H \"Authorization:Bearer ${token//\\\"/}\" \\ -H 'Content-Type: application/json' \\ wait","introducedInQpt":"1.1.34","createdFor":["2.4.2-p2","2.4.6"],"documentedRange":"2.4.2 - 2.4.6-p2","scheduledFixRelease":"2.4.7"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.2 <2.4.4","path":"patches/os/ACSD-48448_2.4.2-p2.patch","blobSha":"b583c2d065fbc508d37292a1b1b31fb77ed38db3","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-48448_2.4.2-p2.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-sales/Model/Service/OrderService.php","change":"modified","package":"magento/module-sales"}],"packages":["magento/module-sales"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2"],"magento-commerce":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2"],"mage-os":[]},"unknownVersions":[],"requires":["MDVA-40399"],"replacedWith":null,"deprecated":false},{"package":"magento/magento2-base","constraint":">=2.4.4 <2.4.7","path":"patches/os/ACSD-52538_2.4.6.patch","blobSha":"7740df1dc593849169c1bbd6dae88ce3f3608785","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-52538_2.4.6.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-sales/Model/Service/OrderService.php","change":"modified","package":"magento/module-sales"}],"packages":["magento/module-sales"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.6-p15","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","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"magento-commerce":["2.4.6-p15","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","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.6-p15","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","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4","2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2"],"magento-commerce":["2.4.6-p15","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","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4","2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-48448 details"}