Greetings! This is my first time posting to the list, so my apologies if I
make a mistake or have missed something obvious.
I am trying to diagnose a problem where re-submission of failed forms
creates duplicates. We have seen this a lot in production, due to
intermittent network connectivity interrupting submissions.
- ODK Aggregate 1.4.7
- Production on Oracle Java 1.7.0_80-b15
- MySQL 5.5.44
- ODK Collect 1.4.5 (1048)
- Forms are submitted from Collect (using InstanceUploaderActivity)
- The submission is processed successfully by Aggregate
- Collect times out trying to read the response, leaving the finalized
- The failed forms are immediately resubmitted (never leaving the
What we expected should happen:
- The second submission would be successful, but would not create
another record in MySQL
The behavior we are observing:
- Both submissions create records with the same information (differing
After searching this group's archives for a solution, I found these:
Duplicate Form Submissions (network latency?)
Generating a Unique ID for a Form Submission
I checked that the form definition includes an instanceID in the form
definition, and it does:
I also confirmed that Collect is generating the appropriate instanceIDs by
inspecting the instances on disk:
Lastly, I found that the duplicate records in LOCATION_CORE have a
META_INSTANCE_ID value matching the instanceID above: "
By attaching a debugger to Aggregate, I discovered that the query used by
SubmissionParser.java:383 is actually trying to find the instance using the
_URI value. This _URI value is distinct for each submission and doesn't
match the instanceID so it never matches.
Is this expected?
Any help would be greatly appreciated. I'm happy to provide more details if