Reviews mix file types, clear inconsistancies in stored diff cache

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

Problem

Reviews are mixing files of one type with another type in the UI. However, clicking on the code changeset shows the correct code.

Cause

There is likely an inconsistency between what Crucible thinks is in the stored diff cache and what is actually there. The stored diff cache is in FISHEYE_INST/var/data/uploads/... and the DB table cru_revision maps these to paths and revisions via the cru_upload_item table.

In the DB, the contents of the files likely do not match what cru_revision expects.

Previous scenarios analysed

This problem has been observed when the following conditions occurred:

  • two instances of Crucible have been running against the same database, this lead to the incorrect set of values for the cru_upload_item field.

  • two backups of Fisheye/Crucible have been restored, where one contained an older set of review caches, and another one a more recent status for the database.

Workaround

  • Make sure that the is a single instance of Fisheye/Crucible connected to the database

  • Force the reviews to create new cache entries by applying the following SQL to the DB:

    1 update cru_revision set cru_upload_item = null

    Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

    Next time a review is viewed, the diffs will be retrieved from your repository and stored again.

  • Vote for this feature request: FE-6658 - Prevent multiple Crucible instances connecting to a single database

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.