Thanks, thats a good idea to diff for the missing ones. I just wondered if 
its behaviour thats been seen before. 
The sync function:

function(doc) { 
  if (doc.category == "free") channel("free")
  channel(doc.wordlist);  // This is the part that I expect to replicate 
the same docs as the SG view.
}

To answer your other question, the number of missing docs *seems* to be 
different each time. More investigation needed.. 


On Thursday, 7 December 2017 21:38:51 UTC, Traun Leyden wrote:
>
>
> It's hard to speculate without knowing more about your setup.  For 
> example, depending on your sync function, certain docs might not replicate 
> down to the device, but still be available via the SG view.
>
> Does it appear sporadic or is it the same behavior each time?
>
> Also, you might try getting the doc id's, sorting them, and then diffing 
> them to find the "missing" docs, which might provide some clues.
>
>
> On Wednesday, December 6, 2017 at 2:31:08 PM UTC-8, Adam Wilson wrote:
>>
>> Following on from 
>> https://forums.couchbase.com/t/sync-replication-progress/14987
>>
>> I have a view on Sync Gateway that counts the number of documents in a 
>> view. This view is basically the same as a channel I have defined. I have 
>> also defined the same view in Couchbase Lite (iOS, v1.4). I am monitoring 
>> progress of very large pull replications by first calling the SG view, and 
>> then calling the same view on CBL whenever there is a pull event, to update 
>> a progress meter. 
>>
>> I am seeing slight differences in the amount of documents reported by SG 
>> and those reported when the replication completes. e.g. 36711 from SG 
>> and 36691 from CBL, another example: 36700 reported by SG, 36697 by CBL. 
>> It seems to be slightly different each time. 
>>
>> I'm wondering if this is an issue with the replicator not getting all the 
>> documents? Or maybe the SG view counting deleted documents? 
>>
>> The view:
>>     "wordlist_count": {
>>       "map": "function(doc) { if (doc.wordlist)  emit(doc.wordlist, 
>> null) }",
>>       "reduce" : "_count"
>>     }
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/95c7b09a-1610-4f8b-9633-1facaf5d8945%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to