-
- Downloads
[FIX] stock: Close remaining transaction on CacheMiss error
To reproduce the issue: 1. Ensure you have an orderpoint in automatic that will be processed by the scheduler 2. Allow a worker to run the scheduler with use_new_cursor=True 3. After orderpoints are searched in procurement.group._run_scheduler_tasks and before the orderpoint is processed in stock.warehouse.orderpoint._procure_orderpoint_confirm, delete the orderpoint through another worker Error: A CacheMiss error will be raised due to the access to orderpoint.qty_to_order in _procure_orderpoint_confirm, what will leave open the transaction from the new cursor declared in the same function. After a while HTTP workers will become unavailable as their own transactions will wait for the lock of the open transaction to be lifted, what won't happen before said transaction is closed. OPW-3121598 closes odoo/odoo#110543 X-original-commit: 4b2af1e1 Signed-off-by:Christophe Simonis <chs@odoo.com>