Issue 11912

Gracefully handle temporary referential integrity problems across databases

11912
Reporter: mdoering
Type: NewFeature
Summary: Gracefully handle temporary referential integrity problems across databases
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2012-09-17 14:09:22.009
Updated: 2014-01-06 16:29:03.892
Resolved: 2014-01-06 16:29:03.854
        
Description: If a primary resource (e.g. species, occurrence, dataset, etc) exists but related, secondary information doesn't the portal should show some error and throw an exception internally. This can happen if our live systems are slightly out of sync, for example when a dataset just got deleted but its included occurrences or name usages are still available.

A proper 404 should only be thrown if the primary resource cant be found.

Some cases that can happen:

- a species page with a missing dataset
- a species page with related name usages ("appears in") that are missing their dataset
- occurrence detail without dataset
- occurrence detail without nub usage (can this really happen?)
- occ & species searches without a dataset
- species search dataset facets without a dataset
]]>
    


Author: mdoering@gbif.org
Created: 2012-09-17 14:16:07.244
Updated: 2012-09-17 14:16:07.244
        
2 example from current content:

species missing its dataset:
http://staging.gbif.org:8080/portal-web-dynamic/species/116384494

species with related usages with one of them being the above species missing its dataset:
http://staging.gbif.org:8080/portal-web-dynamic/species/101758341

    


Author: jcuadra@gbif.org
Comment: We should remind ourselves to talk with Tim to see if he agrees on creating a cron job that replaces staging's registry DB with the live one at nerf.
Created: 2012-09-17 14:26:57.593
Updated: 2012-09-17 14:26:57.593


Author: mdoering@gbif.org
Comment: Adding an ReferentialIntegrityException to the portal and use it when a name usage or occurrence cant load its dataset. If related name usages in the appears in species block cant load their datasets, these will be just be skipped instead.
Created: 2012-09-17 14:40:40.286
Updated: 2012-09-17 14:40:40.286


Author: trobertson@gbif.org
Comment: Tim says talk to Lars - if he is happy, I am happy, but he might have alternative ideas in his messaging architecture etc
Created: 2012-09-17 14:44:20.45
Updated: 2012-09-17 14:44:20.45


Author: mdoering@gbif.org
Comment: Small portal change implemented to catch the current errors, but much wider discussion need for this issue to be resolved. Portal changes subject to be rolled back if needed: http://code.google.com/p/gbif-portal/source/detail?r=1006
Created: 2012-09-17 15:22:50.553
Updated: 2012-09-17 15:22:50.553


Author: kbraak@gbif.org
Comment: We have been gracefully handling referential integrity problems in the portal now for some time.
Created: 2014-01-06 16:29:03.89
Updated: 2014-01-06 16:29:03.89