Thanks Jens, That's useful to know. However, if _replicate isn't responding until the replication is complete, shouldn't it return info like the following? This is what we get back from Cloudant and Apache CouchDB. 1. history: Array[4] 2. no_changes: true 3. ok: true 4. replication_id_version: 3 5. session_id: "e433737319339f83d02906a6010a09df" 6. source_last_seq: 51
Also... what happens if we put a timeout on our call to _replicate? Does CBL continue with the replication? Thanks again Denis On Thursday, January 21, 2016 at 5:56:00 PM UTC, Jens Alfke wrote: > > > On Jan 21, 2016, at 4:17 AM, Denis Howlett <[email protected] > <javascript:>> wrote: > > 1. We POST a _replicate request to CBL with Cloudant as the source, CBL as > the target and a filter to use. > 2. With a poor connection, this replication sometimes takes more than 5 > minutes to return --> I was expecting it to return immediately with a > session_id and ok: true indicating that the replication had been kicked off. > > > Continuous replications send a response immediately; one-shot replications > don’t send a response until complete. (That’s not our idea, it’s how > CouchDB implemented it and we’re going for compatibility.) > > We've had a case just now where we seem to have 6 documents of the 7 we > were expecting. > > > That shouldn’t happen unless the connection is lost. > > What happens if the connection is dropped during a replication? Does it > just add/update the documents it's got so far or is it "transactional" > (i.e. all or nothing)? > > > The puller adds docs as it goes. There is no notion of a transaction. > > How does it work if you then re-sync? Is it able to work out that the > extra document should be synced? > > > Yes, it keeps track of how far it got last time, and will pick up from > there on the next replication. > > —Jens > -- 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/4957648a-3045-48f8-a658-94f2fd3f27c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
