Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21024

DVCS account with repo having high commit count (or huge org size) gets stuck frequently while syncing

    • 8.13
    • 61
    • Severity 2 - Major
    • 42
    • Hide
      Atlassian Update – 25 April 2024

      Dear Customers,

      Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog.

      The workaround for this bug is in the issue description.

      Please continue watching this ticket for future updates and changes in the timeline that impacts your work.

      Best regards

      Daniel Dudziak
      Principal Software Engineer

      Show
      Atlassian Update – 25 April 2024 Dear Customers, Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog. The workaround for this bug is in the issue description. Please continue watching this ticket for future updates and changes in the timeline that impacts your work. Best regards Daniel Dudziak Principal Software Engineer

      Issue Summary

      Repository syncing having huge commits keeps syncing for days without any progress. Needs restart to flush the state and get the new updates. It appears as if it is not doing anything just refresh icon on the UI keep rotating.

      Steps to Reproduce

      • Enable DVCS account and configure it with huge organization or repos having hight number of commit activity.
      • Keep it syncing.
        `

        Expected Results

      • Sync started for the repo in discussion should end in desired period of time.

      Actual Results

      • It keeps of on syncing with like how it appears in the UI:
      • It does not get recent commits/PRs to Jira issues altogether within this period until servers restarted.

      Workaround

      There is no easy workaround for it except server restart. We are working to find out ways to flush the cache programatically. Will need a feature request for that. UPDATE: as of 8.13.11, there is an internal REST method for aborting sync for a given repo:

      POST <JIRA_BASE_URL>/rest/dvcs-connector-internal/1.0/repository/{id}/abortRunningSync
      Authentication: Basic Authentication with the username/password of a Jira Admin user
      

      One way to run this API call is to:

      • Install the add-on Atlassian REST API Browser from ⚙ > Manage-Apps > Manage-Apps
      • Type g+g and search for "REST API Browser"
      • Once on the page "REST API Browser", untick the option "how only public APIs", search for "abortRunningSync", and click on the only API endpoint returned by the search:
      • Disable/Enable the plugin to clear progressMap cache entirely, which has progress info of this and all repository in sync. But this is too hectic as it has 41 components as of 8.13.

      Long Term Suggestion for customers who upgraded from Jira 8.13.x and below to Jira 8.14.0 and above

      In Jira 8.14.0, a more efficient way to sync repositories from a Version Control System (VCS) such as Github, Bitbucket and Gitlab was introduced in the the DVCS module. This new method involves using a new type of webhooks pointing to the Jira application, and used by the VCS repositories.

      For any repository that was added in Jira > ⚙ > Applications > DVCS Accounts before the upgrade to Jira 8.14+, such repository will keep using the old type of webhook even after the Jira upgrade. In other word, the Jira upgrade to 8.14+ will not automatically migrate the webhooks to the new type. Because of that, it is necessary to re-create all these webhooks (by removing and re-adding manually each repository on the Jira side), in order to ensure that the non-polling webhook type is used.

      We would like to encourage our customers who upgraded from Jira 8.13.x and below to Jira 8.14.0 and above, and who already had repositories in Jira before the upgrade, to follow the steps from the KB article Improving the DVCS sync performance by migrating old webhooks to the new format to make sure that the new type of webhook is in use.

        1. AbortSync_Api.png
          86 kB
          Julien Rey
        2. repoSyncStuck.png
          38 kB
          Vikas Pandey

          Form Name

            [JSWSERVER-21024] DVCS account with repo having high commit count (or huge org size) gets stuck frequently while syncing

            Bulk commit has been implemented for GitHub (Cloud & Enterprise) to make sync faster.

            By default soft sync is enabled for bulk.

            Details: https://hello.atlassian.net/wiki/spaces/~712020c5287db23cbe4322bc0cddfb17377b79/pages/4297462773/DVCS+Scalability+-+Process+Commits+In+Bulk+During+Sync

            Rajeev Pandey added a comment - Bulk commit has been implemented for GitHub (Cloud & Enterprise) to make sync faster. By default soft sync is enabled for bulk. Details: https://hello.atlassian.net/wiki/spaces/~712020c5287db23cbe4322bc0cddfb17377b79/pages/4297462773/DVCS+Scalability+-+Process+Commits+In+Bulk+During+Sync

            Stasiu added a comment -
            Atlassian Update – 25 April 2023

            Dear Customers,

            Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog.

            The workaround for this bug is in the issue description.

            Please continue watching this ticket for future updates and changes in the timeline that impacts your work.

            Best regards

            Daniel Dudziak
            Senior Software Engineer

            Stasiu added a comment - Atlassian Update – 25 April 2023 Dear Customers, Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog. The workaround for this bug is in the issue description. Please continue watching this ticket for future updates and changes in the timeline that impacts your work. Best regards Daniel Dudziak Senior Software Engineer

            Rusi Popov added a comment -

            Rusi Popov added a comment - The problem is reproduced and analyzed with JIRA 8.20.11 and GitLab 15.4.3 ee in https://jira.atlassian.com/browse/JSWSERVER-21243?focusedCommentId=3189438&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3189438

            Craig Watson added a comment - - edited

            We are currently directly affected by this bug - it is causing our database server to be pegged at 100% CPU and also causing productivity issues for our engineering teams. We also have an open support case regarding our issues - GHS-226534.

            We are running Jira 8.18.1. Please treat this issue as a priority.

            Craig Watson added a comment - - edited We are currently directly affected by this bug - it is causing our database server to be pegged at 100% CPU and also causing productivity issues for our engineering teams. We also have an open support case regarding our issues - GHS-226534. We are running Jira 8.18.1. Please treat this issue as a priority.

              Unassigned Unassigned
              vpandey2@atlassian.com Vikas Pandey (Inactive)
              Affected customers:
              23 This affects my team
              Watchers:
              39 Start watching this issue

                Created:
                Updated:
                Resolved: