Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete org data due to decision_concept dangling entry #777

Closed
Tracked by #1615
himeshr opened this issue Aug 21, 2024 · 2 comments
Closed
Tracked by #1615

Unable to delete org data due to decision_concept dangling entry #777

himeshr opened this issue Aug 21, 2024 · 2 comments
Assignees
Labels

Comments

@himeshr
Copy link
Contributor

himeshr commented Aug 21, 2024

Describe the bug
Unable to delete org data due to decision_concept dangling entry.
Test for deletion of metadata for apftestach org in Staging environment.

Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "form" violates foreign key constraint "decision_concept_form" on table "decision_concept"
  Detail: Key is still referenced from table "decision_concept".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366)
        at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
        at com.sun.proxy.$Proxy121.executeUpdate(Unknown Source)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
        ... 149 common frames omitted

q2024-08-21 11:21:23.761  INFO 1675484 --- [http-nio-8021-exec-50] o.a.s.f.security.AuthenticationFilter    : DELETE /implementation/delete?deleteMetadata=true Status: 409 User: AchalaB@apftestach Organisation: apftestach Time: 12773 ms
@himeshr himeshr self-assigned this Aug 21, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Aug 21, 2024
@himeshr himeshr added the bug label Aug 21, 2024
@himeshr himeshr moved this from New Issues to In Progress in Avni Product Aug 21, 2024
@himeshr
Copy link
Contributor Author

himeshr commented Aug 21, 2024

Bug missed out while working on avniproject/avni-webapp#787, in-case the form is in the targeted org, but the decision concept is in say parent org (openchs-1).

Could not find code version that matches this stack trace, so seems weird we encountered this in staging.

ErrorStackTrace.txt

@himeshr
Copy link
Contributor Author

himeshr commented Aug 21, 2024

Unable to test this on staging after the fix, due to memory issues limit on the staging machine.
@AchalaBelokar Test the card in prerelease during 10.0 release testing.

@himeshr himeshr moved this from In Progress to Code Review Ready in Avni Product Aug 21, 2024
@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Aug 22, 2024
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Aug 22, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants