I’m using sync gateway on a web application to retrieve documents from couchbase and I’m finding that periodically the update_seq returned from the _all_docs call is higher than the actual highest sequence on the server. Details below:
I first call /_all_docs?include_docs=true and then store the update_seq returned (as well as the documents). When I make an update to a document I first save it to my couchbase server through sync gateway, then I try to refresh my local copy of the DB by calling /_changes?include_docs=true&since=update_seq. I then set the update_seq for the next call to the last_seq returned from the _changes call. Sometimes though the update_seq returned by the original _all_docs call is much higher than the last_seq returned by the _changes call. My understanding based on the documentation though is that both values are supposed to represent the latest sequence number, so how can one value be much higher than the other?