ODK 1.4.4 and 1.4.5 are better at reporting potential data corruption
issues than the earlier ODK Aggregate releases.
This error does require manual database intervention.
It should not occur frequently -- it should be a rare problem.
This is caused when a submission is not completely recorded in the
database. This only occurs on Google AppEngine and is caused by
Google AppEngine aggressively terminating the data-submission process if it
runs longer than 60 seconds. When the data-submission process is
terminated, there is no mechanism to revert and unwind any changes that are
in process, leaving the database in a corrupted state.
To avoid termination, ensure that you only submit data when you have a
good, high-bandwidth data connection to your ODK Aggregate server. The
more media attachments you expect to submit, the higher the required
bandwidth. E.g., portable satellite data connections are probably only
suitable for text-only submissions.
The 60-second timer starts when the first byte of data reaches the server.
bit the server cannot begin doing the necessary processing until the entire
submission is received. If it takes many seconds to send the media
attachments to the server, that delay reduces the time available to
construct and store the data in the database.
Forms without media attachments are much smaller and transmit much quicker,
and can often be reliably submitted on much slower data connections (e.g.,
via satellite).
By paying attention to the quality of the data connection, you should be
able to avoid this error.
With ODK Aggregate 1.4.5, there is a flag on the Site Admin / Preferences
page to skip over these bad records when publishing data to external
applications or pulling the data via ODK Briefcase. Note that checking this
checkbox can cause these data records to be ignored even after they are
manually corrected in the database.
···
-------
Mitch
On Wed, Jan 28, 2015 at 1:25 AM, piqo piqoni@gmail.com wrote:
Hi there,
Using ODK 1.4.4, but this has happened even with older ODK-s.
IllegalStateException: Expected exactly one match in phantom
reconstruction! SELECT * FROM PROJECT_NAME_CORE5 WHERE _TOP_LEVEL_AURI =
uuid:75cfb440-ed8e-4b92-acdb-8a7f0c80665f AND _PARENT_AURI =
uuid:75cfb440-ed8e-4b92-acdb-8a7f0c80665f => expected 1 row but found 2
I correct this by removing a submission (or by changing the uuid of one of
them) in all affected tables, so the Aggregate query will retrieve only a
single row. This solution is a bit ugly since requires database
intervention.
Any idea why this issue might happen, and how to prevent it?
Best,
piqo
--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com