CBL 1.1 (iOS) Docs not syncing when I think they should (sometimes)

25 views
Skip to first unread message

Joe Noon

unread,
May 19, 2015, 5:41:14 PM5/19/15
to mobile-c...@googlegroups.com


I'm having a sync issue with CouchbaseLite iOS 1.1 (25f39670bf87aab8dce1f821de961c39594efc16).  Everything on the server-side and the channels/access looks correct to me. (gist below)

But on iOS, some of these docs are not being synced over to the client.  I'm logging all kCBLDatabaseChangeNotification's changes, and every once in a while a doc will be expected but will never come.  Troubleshooting http shows the user/channels are correct (gist below).  So it appears the iOS pull replication could be missing updates.  It is not consistent or easy to reproduce... the basic  way I can make it happen is to "request" a bunch of docs, which possibly overwhelms SG a bit, and then some of those expected docs never get synced to iOS.

The way I'm "requesting" docs to sync is using this "Want" doc type as you can see in my sync function (gist below).  The user can create a Want document in CBL, and when it is synced up to SG, SG then grants the user access to some doc's channel.

I'm in a transition period from a very network-dependent architecture, so I understand I'm doing something with CBL/SG that is heavily network-dependent and a big idea behind CBL/SG is to *not* be network-dependent.  Eventually I want to lessen these network dependencies, but we have a ways to go here.  In the meantime, it still seems that docs should all sync even if its not quick.  Right now some are just missing.

My next thought it to try a forced pull retry if I suspect the issue, but I'm not sure yet how I can detect this problem.  If anyone has any troubleshooting experience with docs not syncing when you think they should, any advice would be appreciated.

Here is a gist of how the sync function is set up and the http responses: https://gist.github.com/joenoon/7cc8e0aa2db7d51cc9d2

Adam Fraser

unread,
May 20, 2015, 8:37:58 PM5/20/15
to mobile-c...@googlegroups.com
As Pasin mentioned on gitter, please file a ticket for this issue.  It will help reproduce if you can enable all SG logging during both the "request a bunch of docs" phase, and the client replication phase, and include those logs on the ticket.  

Thanks!
Adam

Joe Noon

unread,
May 21, 2015, 2:59:25 AM5/21/15
to mobile-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages