Thanks for the response Jens.

On Wednesday, March 18, 2015 at 9:01:10 PM UTC+5:30, Jens Alfke wrote:
>
>
> (In general: The CBL replicator pushes documents in the order they were 
> last changed, i.e. the least-recently-changed document is pushed first, the 
> latest-changed last. And SG’s _changes feed lists documents in the order 
> that the most recent change was uploaded. But documents are being pushed in 
> parallel HTTP requests on multiple sockets, and those will be processed in 
> SG on multiple threads. If there are errors, docs that failed to upload 
> will be retried later. It gets even crazier if you consider topologies 
> other than stars, where document updates might reach one peer from 
> different sources.)
>
>
We arent using the SG, but for my understanding, do the sequences go out of 
order because of the parallel HTTP Requests from CBLite ? Would it be 
possible to adjust the number of threads in CBLite?
 
To Give a bit more context into our app, there are REST based webservices 
that are called by a python script based on the documents that come in. So, 
if i have a Parent record that got created offline and a child record that 
got created later offline too, a python script(which calls _changes on a 
continuous mode) assumes that the parent would have been created (or 
atleast errored in the server) before the child record comes through. In 
this case,  the REST Api looks like    POST  /api/parent/<parentid>/child 
and it fails because the parentid could not be located (The python script 
typically does a GET on the parentid and feeds it into the POST request). 
Since the changes feed is processed one at a time, it is hard to figure out 
when the related document comes through. It worked well so far for the 
online mode since all documents get pushed as soon as they get created but 
we just hit this problem. Ill have to figure out a way to wait for the 
related record to get through to CouchDB.

Thanks
Raja

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/9012541f-de6b-478b-bf5a-9010a65bf0f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to