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

Fork syncing sometimes fails on Mesh

    XMLWordPrintable

Details

    Description

      Issue Summary

      This is reproducible on Data Center: Yes

      When a repository hierarchy is on Mesh, automatic syncing between repositories and their forks sometimes (rarely) fails with a NoSuchRepositoryException.

      Steps to Reproduce

      1. Create a repository which is replicated across 3 Mesh nodes
      2. Create a fork of the above repository, making sure to enable fork syncing
      3. Push a change to the original repository

      Expected Results

      The change gets synced to the fork and no errors are observed in the logs.

      Actual Results

      Fork syncing sometimes (rarely) fails to happen and the forked repository is no longer up to date with the main repository.

      The below exception is thrown in the atlassian-bitbucket.log file:

      2023-04-03 00:22:18,435 WARN  [ref-sync:thread-1]  c.a.s.i.r.s.a.AutoRefSyncProcessor ~USER/rep-1[5]: Could not synchronize changes with PROJECT_1/rep_1[2]
      com.atlassian.bitbucket.repository.NoSuchRepositoryException: There is no repository with ID p/007a/h/a3583728181ed051c350/r/2
              at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translateNoSuchRepository(DefaultErrorTranslator.java:379)
              at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translate(DefaultErrorTranslator.java:92)
              at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translateIfKnownCause(DefaultErrorTranslator.java:269)
              at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.maybeTranslate(DefaultErrorTranslator.java:57)
              at com.atlassian.stash.internal.scm.git.mesh.AbstractFragmentResponseObserver.callExitHandler(AbstractFragmentResponseObserver.java:174)
              at com.atlassian.stash.internal.scm.git.mesh.AbstractFragmentResponseObserver.asResult(AbstractFragmentResponseObserver.java:150)
              at com.atlassian.stash.internal.scm.git.mesh.BidirectionalFragmentResponseObserver.asResult(BidirectionalFragmentResponseObserver.java:66)
              at com.atlassian.stash.internal.scm.git.mesh.GrpcPlumbingClient.call(GrpcPlumbingClient.java:68)
              at jdk.internal.reflect.GeneratedMethodAccessor1609.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at jdk.internal.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at jdk.proxy4/jdk.proxy4.$Proxy468.call(Unknown Source) 

      Workaround

      Disabling and enabling fork syncing on the forked repository after a few minutes and then pushing another change to the original repository resolves this issue. Changes are now successfully synced between the repository and its fork.

      Attachments

        Issue Links

          Activity

            People

              spetrucev Stefan
              csubraveti Chandravadan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: