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:
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.
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:
Steps to reproduce the behavior:
self.env.cr.commit().