Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8662

UnexpectedRollbackException in full sync if a one or more repos fails to sync in the page

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            mstudman Michael Studman (Inactive)
            mstudman Michael Studman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: