[ https://issues.apache.org/jira/browse/COUCHDB-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399323#comment-13399323 ]
Daniel Gonzalez commented on COUCHDB-1501:
------------------------------------------
Motivation: Benoit Chesneau told me to open a ticket for this. It really is not a big issue for me, since GET /dbname solves my problems, and I am not very worried about having only the *new* changes. I just want to avoid getting all changes since the beginning of time, to avoid processing old information which does not interest me at this moment.
Anyway, commenting your reply: I think it is exactly the other way around. GET /dbname + GET _changes (with "since") means two requests. So it means that the _changes request uses the wrong "since" (the one obtained a couple of milliseconds ago).
So, to make sure I *really* get the only the new changes at the time of calling the _changes API, there is no other way than adding a flag to the _changes API, telling it to take a look at the last_seq and start serving the new changes.
> Add flag to the changes API to return only new changes
> ------------------------------------------------------
>
> Key: COUCHDB-1501
> URL: https://issues.apache.org/jira/browse/COUCHDB-1501
> Project: CouchDB
> Issue Type: New Feature
> Components: JavaScript View Server
> Affects Versions: 1.2
> Reporter: Daniel Gonzalez
> Priority: Minor
>
> As discussed in this thread: http://mail-archives.apache.org/mod_mbox/couchdb-user/201206.mbox/%3CCAAOi-OHB6%3DYu%2Bt%3DWkiFAypQAfnv%3DQd-PL4tELZNL1C1-TQvtWw%40mail.gmail.com%3E
> I copy paste part of the conversation.
> ---
> I am subscribing to the _changes API. My database is quite big, and each time I restart my client, I get all old notifications. I only need the new notifications, since the moment that I subscribe to the feed.
> I have seen that there is a "since" parameter, but this is not helping me further, because I do not know what is the last document sequence number. So I would need one of the following:
> - a method to get the last sequence number to use as value for "since"
> - a flag to tell the _changes API to just give me the changed *from now on*. This would be the most clean solution, since it saves me a request to get the since parameter (which can be outdated anyway very fast). Is there something like this?
> ---
> I ended up going the GET /dbname route
> I guess there is no specific flag for the _changes API to request future changes...
> ---
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira