cht-core
cht-core copied to clipboard
Failure to purge due to "Document update conflict" in telemetry and feedback documents
Describe the bug This is a failure pattern in feedback documents in production instances.
Error when purging meta on device startup: Not all documents purged successfully: telemetry-2022-8-18-user-a6060e40-f32a-4927-9f2d-152018f2ed0b with Document update conflict;
Error when purging meta on device startup: Not all documents purged successfully: telemetry-2022-8-18-user-40244003-b869-45f5-a613-37174c29a706 with Document update conflict;
Error when purging meta on device startup: Not all documents purged successfully: telemetry-2022-8-13-user-1bc7172b-5b44-4ffc-97e3-d8f5cd7fd5f4 with Document update conflict;
Error when purging meta on device startup: Not all documents purged successfully: feedback-2022-08-15T12:49:17.372Z-b46b7acf-b05c-41ec-82ef-473ad022537e with Document update conflict;
For PiH, there are about 5 of these per month. Never multiple times for the same user. Always for telemetry documents or feedback documents.
Expected behavior Purging should be successful
Environment
- Instance: https://pih-malawi.app.medicmobile.org
- Browser: NA
- Client platform: NA
- App: webapp
- Version: 3.14.2
Additional context https://github.com/medic/config-pih/issues/676
This code was moved in 3.15.0 but it looks like it's still susceptible to DUCs. I don't think these will result in Feedback docs but we should check and make sure that purging resumes correctly when a DUC occurs.
Is this ticket in the backlog @garethbowen ?