Skip to content
Snippets Groups Projects
Commit 3cb3cec6 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] core: always close cursors at the exit of context managers

The call to `commit()` can fail during the flush of the environment
and raise an exception before the actual `COMMIT;`, leaving the
cursor unclosed.

This leaked cursor may hold locks that only be released when the GC
collects it. On low-traffic workers like the CronWorker, this can
lock usual database usages.

X-original-commit: ccb58667a475a062e7d27dd39ff9d01ca0bdb68d
Part-of: odoo/odoo#93866
parent 658bc65b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment