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

Identify the amount of data lost and restore, and fix the rootcause #1556

Closed
mahalakshme opened this issue Mar 15, 2024 · 4 comments
Closed
Assignees

Comments

@mahalakshme
Copy link

mahalakshme commented Mar 15, 2024

People in 7.0.3 versions are facing data loss issues:

https://avni.freshdesk.com/a/tickets/3658
https://avni.freshdesk.com/a/tickets/3656

  • In the meantime we try to reproduce and fix the rootcause of the issue, people on ground should not get affected by the lost data. So restore the data side by side.
  • Identify the rootcause and fix the issue.
@mahalakshme mahalakshme converted this from a draft issue Mar 15, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Progress in Avni Product Mar 15, 2024
@petmongrels
Copy link

petmongrels commented Mar 15, 2024

issue seems isolated to certain users. one user was test user since 7.0.0 and has new app with old db.

JNPCT issue is happening from before. Query used.

select users.username, program_enrolment.last_modified_date_time::date, count(*) from program_enrolment join program on program_enrolment.program_id = program.id and program.name = 'Eligible couple' join individual on program_enrolment.individual_id = individual.id join organisation on individual.organisation_id = organisation.id join users on users.id = program_enrolment.last_modified_by_id where program_enrolment.observations::text = '{}' and program_enrolment.program_exit_date_time is null and program_enrolment.is_voided = false and program.is_voided = false and program_enrolment.last_modified_date_time >= '2023-11-01' group by 1,2 order by 2 desc,1;

Other info.
-- no issue in jss and in registration. jnpct & ihmp in enrolment for some users only

@mahalakshme mahalakshme changed the title Identify the amount of data lost and restore Identify the amount of data lost and restore, and identify the rootcause Mar 18, 2024
@mahalakshme mahalakshme changed the title Identify the amount of data lost and restore, and identify the rootcause Identify the amount of data lost and restore, and fix the rootcause Mar 18, 2024
@mahalakshme
Copy link
Author

@petmongrels since Identifying the lost data is linked to identifying the rootcause - I added that also to this card, since u are already working on both.

@mahalakshme
Copy link
Author

@petmongrels adding the updates here, kindly edit if I missed something:

  • Data of all orgs restored
  • Issue happening from around 3 months back - around 6.0 itself
  • Fix done on server side to prevent saving of empty observations. During next time sync users will get back the actual value to mobile. But @petmongrels I think this will not happen since last_modified_date_time in the server db will not be updated.
  • Inspite of the fix above, user will permanently lose any edited value.

@petmongrels
Copy link

These commits should be included in the next 7.0.x release.

@petmongrels petmongrels moved this from In Progress to Done in Avni Product Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants