Reviews mix file types, clear inconsistancies in stored diff cache

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

    update cru_revision set cru_upload_item = null

    Always back up your data before performing any modifications to the database. 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: CRUC-7260 - Getting issue details... STATUS

Last modified on Jul 31, 2018

Was this helpful?

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