Details
-
Bug
-
Resolution: Fixed
-
Low
-
4.2.0
-
None
Description
In the Smart Mirror synchronization algorithm, if database level errors happen (e.g., a constraint violation if an update in response to a webhook event to the same repository is committed concurrently) then the entire transaction potentially including updates to a large number of repositories is rolled back. This can be seen in the logs as errors of the form:
2016-04-24 02:51:21,287 ERROR [threadpool:thread-4] c.a.b.i.m.m.s.DefaultMirrorSynchronizationHelper bitbucket (url=...): full synchronization failed org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
This should be fixed so that transactions that fail due to concurrent updates only roll back a small number of updates, and that the full synchronization algorithm retries those updates after a short delay.