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

Redundant repair of repositories on mirrors

XMLWordPrintable

      Issue Summary

      Sometimes the mirror farm nodes keep detecting a repository as inconsistent every 3 mins (unless plugin.mirroring.synchronization.interval configured differently) in the scheduled job and perform a repair even though there are no changes done on the repository for long time. This keeps on happening until a new change is pushed in that repository. This can result in unnecessary processing on the mirrors and the mirror:repo_synchronized webhook being triggered unnecessarily.

      Steps to Reproduce

      There are no clear known steps to reproduce, the issue happens when the content hash of a repository is not updated on the primary server when a new change is made in the repository. This can happen for any reason e.g. one of the reasons being the refs changed event is dropped.

      Expected Results

      No repair process should run for a repository when it's contents are already in sync on the mirror with the primary.

      Actual Results

      Repository is detected as inconsistent and a snapshot sync process runs for the repository every 3 minutes on all the mirror nodes. The below line is logged -

      2024-09-13 00:07:00,665 DEBUG [Caesium-1-2] *K63RE3x7x40299359x5865 c.a.b.i.m.mirror.vet.VetContext Detected content inconsistency in repository with ID (1234), repairing
      

      Workaround

      Create a temporary branch in the repository, let it sync on the mirror and then delete the branch.

              mgoyal2@atlassian.com Manish
              mgoyal2@atlassian.com Manish
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: