Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.0.0
-
None
Description
There is unfortunate scenario possible leading to 3.0 upgrade failing halfway through. Moreover after restarting Fisheye it seems like it is continuing the upgrade and is becoming fully operational, while it is not.
Issue would affect users with more than one null stored path row trying to upgrade to 3.0.0 release
select count(*) from cru_stored_path t where t.cru_path is null
When they upgrade their instance they would see a fatal error preventing upgrade to finish:
FATAL - Hash (SHA-256) conflict found: StoredPath(null) is found to have same hash [null] as path [null]
But because upgrade task is run after sql db upgrade script is run, the persisted data would indicate the upgrade was successful. So next time user tries to start Fisheye it would continue upgrade from the next step, even though current step is incomplete ... And because it is incomplete unique index on cru_stored_path.cru_hash column would be never set. that would lead to further duplicated paths leading to errors like:
An org.hibernate.NonUniqueResultException was encountered query did not return a unique result: 2