-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix duplicate images with respect to data #634
Comments
Media table deletes not done as ETL will update this automatically. |
Queries have been created here Needs to be executed on prod. |
Entries found on pre-release:
Moving to QA Failed as the updated queries had to be run multiple times for Individuals and encunters to bring the count down to 0. |
From the updates, looks like query for individual had to be executed 3 times and for encounter 2 times. @himeshr could you confirm? Checked the rows that needed to be processed multiple times and they contained multiple image concepts so I guess this is an edge case and might have been caused due to some row locking by the update statement. Do we need to spend any more time on this given that the number of times the script needs to run is minimal and changing the approach to handle this edge case will take time? |
Yes, query for individual had to be executed 3 times and for encounter 2 times. Do we need to spend any more time on this given that the number of times the script needs to run is minimal and changing the approach to handle this edge case will take time? |
Prod run log:
|
As a user, I dont want any data created by me to be uploaded multiple times, leading to duplicates.
As part of the issue mentioned in this card, there are duplicate images in the data created as a result of duplicate sync(simultaneous automatic and manual syncs).
Analysis:
Using the variation of the above query concept_uuids for media data types and the organisation uuids that use it were identified. And it was found such concepts are used only in the form types Encounter, IndividualProfile, ProgramEncounter, ProgramEnrolment.
A plpgsql function to find duplicates given the table names and concept_uuids was created.
The above things were used in the below query to find the duplicates:
Results of analysis:
Acceptance criteria:
The text was updated successfully, but these errors were encountered: