Crucible review re-indexing fails with ObjectNotFoundException
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
問題
The Crucible review re-index fails and the following error is written in the logs:
2020-12-08 19:05:42,983 ERROR [ReviewIndexer1 ] fisheye DefaultReviewItemIndexer$2-call - Error indexing reviews
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.cenqua.crucible.model.CrucibleRevision#56023]
診断
In this log line above the error happened in a revision whose ID is 56023.
Connecting to the database and running the SQL query below doesn't return any results for that ID:
SELECT * FROM cru_revision WHERE cru_revision_id = 56023;
原因
There is a database inconsistency causing this issue.
回避策
The inconsistency needs to be cleaned from the database by:
- Shutting down Fisheye / Crucible
- Connecting to the database used by Fisheye / Crucible
Running these two DELETE commands in the order they show up below:
DELETE FROM cru_frx WHERE cru_frx_id IN (SELECT cru_frx_id FROM cru_frx_revision WHERE cru_revision = 56023); DELETE FROM cru_frx_revision WHERE cru_revision = 56023;
Replacing the revision ID accordingly.
- Starting up Fisheye / Crucible
- Right after the startup the instance should trigger a review re-index automatically - and from scratch, not from where it stopped - because the previous attempt has failed.
- Repeat these steps above for every similar error reported.
注意:
Whenever the error above happens the re-indexing halts, meaning that this error will only be written once in the log file per re-indexing attempt, so this may result in many re-indexing attempts from scratch if there are many inconsistencies.
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。