Tangerine-Community / Tangerine-legacy

THIS REPOSITORY IS LEGACY AND OUTDATED -- Tangerine: An app for assessing math and reading skills, designed for tablets but works everywhere.
GNU General Public License v3.0
14 stars 11 forks source link

Tangerine Assessment Bug #615

Open atifrasheed79 opened 11 years ago

atifrasheed79 commented 11 years ago

Hello there,

We are using Tangerine for Grade 2 baseline assessments and encountering various problems. Problem I am currently reporting is about assessment results where our field engineer reported that he assessed almost 9 students. Now suddenly tablet was powered-off and upon restart he realized those results (of 9 students) are not there.

We started looking into it by fetching couch.log from the tablet. We realized that it's actually true as we can see those attempts in couch.log and we can also see successful HTTP PUT requests as well. Now we took that data from couch.log and tried to push it to tangerine/couchdb where it worked. Now we are not sure what went wrong when tangerine pushed it to couchdb.

I am pasting steps and snippets from couch.log where you can see successful PUT but on the other hand GET request fails against same id.

0) Stage 0: We looked into couch.logs and found a successful PUT against a particular assessment result.

stage-0

1) Stage 1: Tried to get the same document by id and the couchapp return not_found

stange-1

2) Stage 2: Then I manually copied last revision from that log file And PUT it manually via REST Client

stage-2 01 stage-2 02

Please note that the "_rev" at this stage is 34 because we hard-coded it in data file while sending through REST API. Obviously, if we remove that line from JSON, The _rev would be 1.

Please look into it and let us know if you need more details but this seems to be a potential bug.

Thank you.

atifrasheed79 commented 11 years ago

Hi, we had already identified the problem and posted the same to couchdb forum where I got the RCA (Thanks to Robert). Issue is because of delayed_commit=true in couchdb configuration. We will try it in our custom build Tangerine app and will keep the ticket updated for everyone else's benefit. But as of know this delay_commit=true looks like the root cause and I am sure it's going to be fixed if we set it to false as proposed by coucdb guys.

fetmar commented 10 years ago

Thank you for looking into this problem and sharing your findings. :+1:

My first question is, what kind of tablet were you using? We've had much luck with Nexus 7s. We strongly recommend that Kindle's not be used due to the non-standard version of Android. Phonegap applications require a system component called WebView that behaves in a way that seems to indicate aggressive caching of network requested data.

I hope you were able to resolve the issue. We have never encountered this error before but we are aware that delayed_commits is set to true as an optimization effort.

If the tablet had suddenly powered off, I can see why delayed_commits=true might have caused the document to not be written to the disk once it was created, thus being lost in volatile memory.

Setting delayed_commits=false might make things run slower but it would make it more crash tolerant. There is a bit of a trade off there.