update_seq stays the same


#1

Hi,

I’m noticing that “update_seq” never changes when I get the information on the my database. This affects the sync feed, as it’s always syncing changes from the beginning of the sequence. As the number of documents grows, the longer it takes to sync all these changes, even if they’re already on the local db.

Any suggestion on how to get the latest sync sequence on the app during initialization so that it only sync changes since the last time the user was logged in?


#2

You should be using the last_seq returned by the _changes feed to identify what the user has already synchronized, and as the since value for a subsequent changes request.

If you’re using a continuous changes feed, you’d use the latest sequence seen on the changes feed as the since value on next startup.


#3

Got it. I’m surprised that update_seq does not automatically update with last_seq by the _changes feed. Is it okay practice to set the value of update_seq with last_seq?