My app has a content provider which stores its data in a SQLite db. I have 
a thread which is busy inserting rows into this content provider. I have 
another thread which inserts some rows into the content provider and then 
signals the first thread. When the first thread sees the signal, it stops 
inserting and queries for the data the other thread inserted. But what I'm 
finding is that often the cursor the query returns doesn't contain all of 
the rows the other thread inserted. If I sleep the thread for a second and 
query again, then all the rows are there.

It seems like the database is reporting that it has successfully stored the 
data, but it hasn't been flushed to the backing store yet. And the query 
that happens shortly after doesn't see the data that is waiting to be 
flushed.

Has anyone else seen this problem? Is this a bug in SQLite? Any suggestions 
on how to deal with it?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to