OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
130 stars 169 forks source link

Pathways analysis list fails to load when cohort dependency removed #1329

Closed anthonysena closed 5 years ago

anthonysena commented 5 years ago

We're experencing an issue whereby a pathway analysis referenced a cohort that was removed from the system. In this scenario, we cannot pull back the list of pathway analyses using the endpoint:

/WebAPI/pathway-analysis?size=10000

We should also investigate the other analysis types that reference cohort definitions to ensure that this problem is not more wide-spread.

anthonysena commented 5 years ago

The impact of deleting cohorts has various effects in the system which I will detail in a separate issue and link to this one. For this issue, we should investigate the behavior mentioned above and also the behavior of loading a single pathway analysis where a cohort definition reference is removed. In my testing, this also fails.

anthonysena commented 5 years ago

In reviewing this issue with @pavgra this appears to be something unique in our environment with our WebAPI database. I'm going to investigate this further but we've been unable to reproduce this on other instances as noted in #1330.

anthonysena commented 5 years ago

This was an issue specific to our environment - the problem was related to session_replication_role. In the parameters group config, this was set to ‘replica’ but it should have been 'origin'. This was done when we migrated our WebAPI DB to PostgreSQL and was not reset. When this happens, the FKs in the DB are disabled which is what caused this issue.