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

Concurrent Sync Worker execution can lead to data inconsistencies #2361

Closed
MJ1998 opened this issue Dec 8, 2023 · 0 comments · Fixed by #2385
Closed

Concurrent Sync Worker execution can lead to data inconsistencies #2361

MJ1998 opened this issue Dec 8, 2023 · 0 comments · Fixed by #2385
Assignees
Labels
P1 High priority issue

Comments

@MJ1998
Copy link
Collaborator

MJ1998 commented Dec 8, 2023

Describe the bug
Recent changes in PR #2053 allow two sync workers to run concurrently.
This can lead to inconsistencies if a manual one-time sync and a periodic sync overlap.
The problem arises because both workers might attempt to upload resources in a conflicting order, potentially causing:

  1. Upload of older resources before newer ones
  2. Overwriting of data

Component
Fhir Engine Library

To Reproduce
Steps to reproduce the behavior:
Not sure how to reproduce as it requires concurrent running of the workers to sync resources that can cause inconsistency.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel4a emulator]
  • Android version: [e.g. Settings -> About phone -> Android version]
  • Build number: [e.g. Settings -> About phone -> Build number]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.

@MJ1998 MJ1998 added the P1 High priority issue label Dec 9, 2023
@MJ1998 MJ1998 mentioned this issue Dec 21, 2023
7 tasks
@MJ1998 MJ1998 changed the title Manual sync can lead to data inconsistency if periodic sync is running Sync Workers can run parallelly causing data inconsistency Jan 7, 2024
@MJ1998 MJ1998 changed the title Sync Workers can run parallelly causing data inconsistency Sync Workers can run paralelly causing data inconsistency Jan 7, 2024
@MJ1998 MJ1998 changed the title Sync Workers can run paralelly causing data inconsistency Concurrent Sync Worker execution can lead to data inconsistencies Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority issue
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

1 participant