[ 
https://issues.apache.org/jira/browse/COUCHDB-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682301#action_12682301
 ] 

eric casteleijn commented on COUCHDB-290:
-----------------------------------------

The problem it solves is that for many update triggers, it is important to find 
out what has changed in the update, which unfortunately means logging sequence 
numbers outside of couchdb, so that an all_documents_by_seq 
query?startkey=old_seq can be run to find out which documents have changed. I 
think this is a pretty common use case.

We can of course let each update trigger call fire off a request to the db to 
get its current seq_no, but that's unfortunate since the information could 
easily be provided to the update trigger, and by the time the request has 
returned, the sequence number might have changed again.

A list of changed document ids would be even better, but if this is not 
possible, we will have to do requests for them. 

Bulk updates aside, this would always be a single document id though, or am I 
wrong? If there is a way to pass that document id *or*  "_bulk" or something, 
that would solve it for all non-nulk updates at least. I realize that would 
probably be a more involved patch.

> Include sequence number in update notifications
> -----------------------------------------------
>
>                 Key: COUCHDB-290
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-290
>             Project: CouchDB
>          Issue Type: Improvement
>    Affects Versions: 0.9
>            Reporter: Elliot Murphy
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: couchdb-sequences.patch, couchdb-sequences.patch
>
>
> Hi! There's been requests to include the sequence number when sending an 
> update notification.  Thanks to the guidance from davisp on #couchdb on March 
> 13th, I've been able to put together a little patch that does just that. In 
> the future I'm interested in doing the same for the create notification, and 
> perhaps extending create/delete/update notifications to include a list of 
> affected doc IDs.
> For now though, just this simple patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to