couchdb-replication mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: What can last_seq from _changes be?
Date Mon, 01 Jun 2015 21:34:02 GMT

> On Jun 1, 2015, at 12:57 PM, Paul Harter <paul@glowinthedark.co.uk> wrote:
> 
> In the CouchDB docs it states that last_seq in the the return value of
> _changes should be a number.

The docs are incorrect, then. In the REST API, sequences are arbitrary opaque JSON objects.
This has been true since at least 2011.

It happens that CouchDB uses integers (as does Couchbase Lite.) However, BigCouch and Cloudant
both use strings. Couchbase Sync Gateway usually uses numbers but will use strings in some
circumstances.

Applications should treat sequence IDs as opaque. They’re not ordered, and you can’t even
safely compare them for equality. The only use of a sequence ID is as a ‘cookie’ you get
from the remote DB in order to pass back to it later, to continue the changes feed from where
you left off.

—Jens
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message