Fisheye/Crucible upgrade to versions > 4.8 fails with unique constraint violation on uk_source_rev_path_hash

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

要約

In rare cases, an upgrade to Fisheye/Crucible may fail to upgrade the database with a unique constraint violation on uk_source_rev_path_hash. It is caused by data duplication originating from Crucible older than 3.0.

環境

Upgrade to Fisheye > 4.8.0

診断

In upgrading to Fisheye/Crucible 4.8.0 or later, the following type of error in atlassian-fisheye-<date>.log prevents the upgrade from completing:

Oracle example
<date> ERROR - The Web context could not be started
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbControlFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor threw exception; nested exception is com.cenqua.crucible.hibernate.CruDBException: Problem upgrading database
...
Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem upgrading database
...
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (FISHEYE_OWNER.UK_SOURCE_REV_PATH_HASH) violated
SQL Server example
<date> ERROR - The Web context could not be started
Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem upgrading database
	...
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.cru_revision' and the index name 'uk_source_rev_path_hash'. The duplicate key value is (xxxxxxxxx).
	


原因

It is caused by data duplication originating from Crucible older than 3.0.

ソリューション

(warning) Ensure you first have a backup of the pre-upgrade database

  • Stop Fisheye/Crucible
  •  Run the  version of this script compatible with your database (Oracle, SQLServer or Postgres)
    (i) This is an example script and may need to be modified
  • Start Fisheye 4.8

You can always contact Atlassian Support for guidance.



最終更新日 2021 年 6 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.