How the DVCS synchronization works in Jira Server and Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
DVCS is a plugin in Jira that synchronizes data from repositories. To better understand its features, check Integrating with development tools.
Here we'll better understand the synchronization process.
Solution
Environment
Jira 8 or later on-premises.
Notice that there are differences between 8.14+ and earlier versions on how webhooks behave.
Sync types
Below are listed the types of syncs. We'll see when they're called in the Sync trigger session.
1. Soft syncs
Syncs that update data in the database. Consists of Changesets and/or Pull request sync.
Click sync icon button to do soft sync:

2. Full Sync
Syncs that delete the data present in the database before starting. Consists of Changesets and Pull request sync.
Full syncs are only run by performing UI/REST API specific requests or by adding a new repository.
To show the full sync dialog: SHIFT + left mouse on the sync icon and click on the Full sync button:

3. Changeset sync
Fetches all branches for the repository and creates an item in the message table for each, to synchronize its changesets.
Then:
If the changeset already exists, skip to the next one;
Fetch commit data;
Attempt to extract the issue key from the commit message;
Mark it as a smart commit if:
smart commits are enabled,
the sync is a soft sync,
and a potential issue key has been extracted
Create Changeset in the database
4. Pull request sync
Fetches pull requests for the repository and create/update them as needed.
5. Repository Fetch
Fetches all the repositories for the organizations. If the automatic sync option is enabled, the new repositories will be synchronized.
6. Webhook sync
In Jira 8.14 or higher, the webhooks from the repositories are consumed and update the related tables, without fetching data.
For this to work, it needs to reach the new endpoints, as described in Improving the DVCS sync performance by migrating old webhooks to the new format. Otherwise, it will behave just as in pre-8.14 versions.
In earlier versions (8.13 or lower), the webhooks are just triggers for soft syncs.
Sync triggers
During regular operation, these are the events that trigger syncs:
1. Scheduled job
DVCS has a scheduled job that runs by default every hour.
ℹ️ For environments with large volumes of data to be synchronized, we recommend increasing the interval. Check How to change the interval or schedule of the DVCS repositories sync in Jira Data Center
For all organizations:
It fetches all repositories;
Runs a soft sync for changesets and pull requests for all repositories.
2. Webhooks (pre-8.14 endpoint)
For Jira running 8.13 or earlier or for repositories added in the early versions, webhooks will trigger either a Changeset or Pull request soft sync, depending on the data in them.
For repositories using the new endpoints in Jira 8.14+, the payload is consumed and no sync is triggered.
Troubleshooting
To troubleshoot DVCS syncs, enable the DEBUG logging level (or TRACE, if you'd like to log full message body content) for the com.atlassian.jira.plugins.dvcs
package and check the atlassian-jira.log
files.
Was this helpful?