Sync Gateway update_seq higher than last_seq

I have just tested and confirmed that the _all_docs call returns the global sequence number stored in the couchbase document _sync:seq

Whereas the _changes returns the last sequence Id calculated from the documents mapped to the channels they have access to.

The global sequence stored in the _sync:seq document, can be incremented for internal use as well as new document revisions, so this value does not accurately represent the highest document sequence_id.

I have created a new github ticket to capture this: https://github.com/couchbase/sync_gateway/issues/490

Andy