MDVA-30112: large number reservation inconsistencies
The MDVA-30112 patch solves the issue where you have an unexpectedly large number of reservation inconsistencies in the inventory_reservation
table. Reservation inconsistencies include unregistered open orders and complete orders that are not registered. This patch is available when the Quality Patches Tool (QPT) 1.0.8 is installed. Please note that the issue was fixed in Adobe Commerce version 2.4.2.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce on cloud infrastructure 2.3.5
Compatible with Adobe Commerce versions:
- Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.3.4 - 2.3.5-p2, 2.4.0 - 2.4.1
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 bunch-size value is the value for how many orders to load at once. When there are more orders than this value, Adobe Commerce considers the orders with pending status to be inconsistencies.
bin/magento inventory:reservation:list-inconsistencies
in the CLI. Another issue that is fixed is duplicate data in the inconsistencies list. Also, the issue where a reservation is created before order placed (previous realization based on reservation after order placed). For the solution, refer to MDVA-33281: inventory inconsistency issues in our support knowledge base.Prerequisites:
You run the following command in the CLI to list reservation inconsistencies in the inventory_reservation
table:
magento inventory:reservation:list-inconsistencies
You see an unexpectedly large number of reservation inconsistencies and/or the command never completes.
Steps to reproduce:
-
Run the following command in the CLI to resolve the inconsistencies:
code language-none bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations
-
Place three orders:
- Assign each a single product.
- Use the Check/Money Order payment method, so the order status will be “pending”.
-
You can see three records with -1 quantity in the
inventory_reservation
table. Run the following command in the CLI to see any inconsistencies:code language-none bin/magento inventory:reservation:list-inconsistencies
This returns no results, which is correct.
-
Run the following command in the CLI:
code language-none Execute bin/magento inventory:reservation:list-inconsistencies --bunch-size 1
You see the “pending” status orders are shown as inconsistencies.
-
Run the following command in the CLI:
code language-none bin/magento inventory:reservation:list-inconsistencies -r --bunch-size 1 | bin/magento inventory:reservation:create-compensations
Expected results:
Adobe Commerce should not resolve inconsistencies of “pending” status orders. The stocks inconsistencies should be resolved for orders with ‘complete’, ‘closed’, and ‘canceled’ statuses.
Actual results:
When there are orders more than the specified bunch-size value, Adobe Commerce considers orders with “pending” status as inconsistencies and adds multiple inconsistency resolving records for the same order.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.