I have tried to run the following command to compensate the inventory reservation.
bin/magento inventory:reservation:create-compensations -r
But it got stuck as in the below image.
It would be very helpful if anyone has a solution to this issue.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
This command is waiting for you to tell it what compensations to create. See https://devdocs.magento.com/guides/v2.3/inventory/inventory-cli-reference.html for more detail, but generally what you want to do after truncating the
inventory_reservations table is to pipe the output of list-inconsistencies into create-compensations:
bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations
However, if you have a 3rd party manually modifying orders or qty directly in the database then you just need to turn off MSI because it can't track what it doesn't know about.
You can truncate
inventory_reservation table it will resolve your issue.
You can find more details here. https://github.com/magento/inventory/issues/2046
The one always take backup before performing direct SQL :)