I am using Couchbase as a nosql database solution for my android app, but I have been having problems loading my data. My app features forms that users can fill out and then view a list of all the forms they’ve filled out and submitted so they can view and edit their answers. My back end server is running Couchbase 3.0.1 community edition and my app is running Couchbase-lite 1.0.3
My problem is that sometimes when I query couchbase, it returns all my data but sometimes it only returns a subset of my data. For example, I have 15 forms right now but sometimes it will only find 13 or 14. Viewing the list of filled-out form records is unreliable and I often see less records in the list than I know there should be, although I know the data isn’t missing because the rest of the records will pop back up spontaneously later. Even letting the phone go to screensaver and then opening it back up and resuming the app will often show a different amount of records in the list than there were before. I am also not always able to log in with all of my user accounts, as sometimes the query for users will only return 25 or so of my 36 existing users and if the account I am trying to use is not one of the ones found, I won’t be able to use it to log in.
I think I have noticed that my older data is more reliable than my newer data, but it’s hard to say for sure since it’s so variable every time I load the app. But my original user account can always log in, while my newer account that I made recently for testing can only log in about half the time.
Why isn’t all of my data being found in the query and is there a way that I can force Couchbase to make sure it is getting all existing data?
What version of Sync Gateway are you using? This sounds similar to some issues that were fixed in version 1.1 — sometimes the “changes feed” generated by the Gateway was missing some changes, so the client didn’t know to pull them.
If you upgrade to 1.1 and this persists, please reply and we’ll help you troubleshoot it.