Forked repository does not get synchronized until fork syncing is turned off and on again

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Repository A has been forked to Repository B and fork syncing is enabled. However, you see that even after pushing changes to repository A repository B does not get updated. After turning off fork syncing in repository B and turning it on again you see that repository B eventually gets synchronized with all changes made to repository A.

Environment

This has been observed in Bitbucket Data Center and Server 7.21.23 but can potentially occur in other versions too.

Diagnosis

  • Changes have been pushed to repository A but the changes were not synchronized to repository B

  • After disabling and re-enabling fork syncing in repository B, repository B gets updated with all changes made to repository A

Cause

This can happen if repository A is particularly large (it is hard to provide a specific repository size that would be considered particularly large unfortunately) and fork syncs take a very long time and seem to never finish. This also means that if you waited long enough you would eventually see the changes from repository A synchronized to repository B.

Solution

Increase the number of threads processing fork synchronization to 3 per node. Multiply the number of nodes in your cluster with 3 and then set that as the value of the plugin.bitbucket-repository-ref-sync.threads property in the <BitbucketHome>/shared/bitbucket.properties file. For instance if you have 3 nodes in your cluster, set the value to 9:

plugin.bitbucket-repository-ref-sync.threads=9

Restart all Bitbucket Data Center nodes following this change - you can restart them one at a time.

Last modified on Jan 3, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.