-
-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Labels
Description
Module
connector
Describe the bug
After the changes introduced in OCA/queue#881 in
OCA/queue (removal of the implicit commit before job execution),
we have detected a transactional inconsistency in the connector framework.
In the export flow, the synchronizer still performs an explicit:
self.env.cr.commit()
inside:
connector/components/synchronizer.py (line ~166)
Now that queue_job no longer commits before executing the job logic,
this explicit commit breaks the job execution.
If a failure occurs later in the same job execution, the binding
(external_id, sync_date, etc.) may already be committed while the job itself
is marked as failed.
To Reproduce
Affected versions:
- connector 16.0 +
- queue_job 16.0 + (after merge of [16.0][BP][IMP] queue_job: prevent commit during queue job execution queue#881)
Steps to reproduce the behavior:
- Execute any export using a connector GenericExporter.
- Ensure that the export logic reaches the explicit
self.env.cr.commit(). - Raise an exception later in the same job execution flow.
Reactions are currently unavailable