Hi,

On Mon, Jun 1, 2015 at 10:57 PM, Paul Harter <[email protected]> wrote:
> I'm using CouchDB and Couchbase Sync Gateway together on a project and have
> run into an incompatibility in how they replicate.
>
> In the CouchDB docs it states that last_seq in the the return value of
> _changes should be a number.
>
> Sync Gateway sometimes returns strings like "82::100", two or more ints
> separated by pairs of colons. When CouchDB gets a values like this during
> replication from SG it returns it in its next _changes GET as a JSON
> encoded string with quotes:
>
> ?since=%2282%3A%3A100%22
>

It seems that replicator is confused or done wrong. There should be no
case when replicator operates with seqs format which Source peer
cannot understand. I believe this error could be happened because of
any of these conditions:

- SG Source peer was transparently replaced by CouchDB;
- Replicator has an error in replication logs comparison logic when it
accidentally takes Target update_seq which Source peer cannot
understood;

Could you provide a bit more information what's your replication case
and who is running your replication?

> So the question is: can last_seq be any json value and if so should it
> always be json encoded in the _changes get query string as CouchDB
> currently does, or is CouchDB misbehaving in adding the quotes to the
> string? Or should it just always be a number as the docs state?

Yes, it can be any JSON value. For CouchDB 1.x it's number, for
Cloudant it's string, for CouchDB 2.0+ it's array of number and string
pair.

--
,,,^..^,,,

Reply via email to