-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Reject Duplicate Submissions #5047
Open
rajpatel24
wants to merge
32
commits into
main
Choose a base branch
from
862-reject_duplicate_submissions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
August 5, 2024 16:20
28eefe5
to
039ed95
Compare
rajpatel24
changed the title
862 Reject Duplicate Submissions
Reject Duplicate Submissions
Aug 5, 2024
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
August 7, 2024 13:51
039ed95
to
6a177da
Compare
noliveleger
changed the base branch from
beta
to
kobocat-django-app-part-2-refactor-mock-deployment-backend
August 21, 2024 19:47
# Conflicts: # kobo/apps/openrosa/apps/logger/exceptions.py # kobo/apps/openrosa/apps/logger/models/instance.py # kobo/apps/openrosa/apps/logger/models/xform.py # kobo/apps/openrosa/apps/logger/xform_instance_parser.py # kobo/apps/openrosa/libs/utils/logger_tools.py
noliveleger
changed the base branch from
kobocat-django-app-part-2-refactor-mock-deployment-backend
to
beta-refactored
August 26, 2024 15:05
This was referenced Aug 27, 2024
noliveleger
requested changes
Aug 27, 2024
kobo/apps/openrosa/apps/api/tests/viewsets/test_xform_submission_api.py
Outdated
Show resolved
Hide resolved
noliveleger
reviewed
Aug 27, 2024
…-reject_duplicate_submissions
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
2 times, most recently
from
September 3, 2024 10:51
bf597d5
to
2958052
Compare
- Add test case for duplicate submission with an attachment - Improve logic to extract UUID from xml - Add logic to reject submission without UUID
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 3, 2024 17:29
2958052
to
f3c89f6
Compare
noliveleger
requested changes
Sep 3, 2024
noliveleger
requested changes
Sep 3, 2024
…lbox/kpi into 862-reject_duplicate_submissions
noliveleger
requested changes
Sep 17, 2024
kobo/apps/openrosa/apps/logger/tests/data_from_sdcard/bulk_submission.zip
Outdated
Show resolved
Hide resolved
noliveleger
reviewed
Sep 17, 2024
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 18, 2024 18:03
648aca5
to
24a51bf
Compare
…different content
…lbox/kpi into 862-reject_duplicate_submissions
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 19, 2024 14:43
1d6e6ea
to
e7f73d5
Compare
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 19, 2024 14:44
e7f73d5
to
cc37b6c
Compare
…es but different content
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 23, 2024 11:27
b9bf71b
to
cdc71db
Compare
noliveleger
requested changes
Sep 23, 2024
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
kobo/apps/openrosa/apps/logger/management/commands/clean_duplicated_submissions.py
Outdated
Show resolved
Hide resolved
noliveleger
requested changes
Sep 23, 2024
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 27, 2024 20:15
c87f862
to
86e9313
Compare
…together constraint
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
September 30, 2024 09:00
86e9313
to
306888b
Compare
# Conflicts: # kobo/apps/openrosa/apps/api/tests/viewsets/test_xform_submission_api.py # kobo/apps/openrosa/apps/logger/tests/test_simple_submission.py # kobo/apps/openrosa/apps/logger/xform_instance_parser.py # kobo/apps/openrosa/libs/utils/logger_tools.py
# Conflicts: # kobo/apps/openrosa/libs/utils/logger_tools.py
rajpatel24
force-pushed
the
862-reject_duplicate_submissions
branch
from
October 17, 2024 21:06
5f50949
to
362bfa8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
We have identified a race condition in the submission processing that causes duplicate submissions with identical UUIDs and XML hashes. This issue is particularly problematic under conditions with multiple remote devices submitting forms simultaneously over unreliable networks.
To address this issue, a PR has been raised with the following proposed changes:
Race Condition Resolution: A locking mechanism has been added to prevent the race condition when checking for existing instances and creating new ones. This aims to eliminate duplicate submissions.
UUID Enforcement: Submissions without a UUID are now explicitly disallowed. This ensures that every submission is uniquely identifiable and further mitigates the risk of duplicate entries.
These changes should improve the robustness of the submission process and prevent both race conditions and invalid submissions.
Notes
Related issues
Supersedes kobotoolbox/kobocat#876