couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (JIRA)" <>
Subject [jira] Commented: (COUCHDB-290) Include sequence number in update notifications
Date Mon, 16 Mar 2009 12:58:50 GMT


Jan Lehnardt commented on COUCHDB-290:

@Adam Good one.

@Eric The default use case is that you track the last seq_nr you queried on. The only special
case is the first request where you don't have a seq_nr and get everything from your DB. There
is nothing "unfortunate" about that, it's the API. I don't see how including the current seq_nr
in the notification would help at all in this case. It would help if the result of _all_docs_by_seq
would include the then latest seq_nr so the process can store it and I believe it does.

Adding a list of documents comes with more problems: 

1) In a bulk operation, you might get _a lot_ of ids and you'd need to take care of that.
2) The API is meant to be asynchronous. CouchDB does not have to track which documents get
sent to the notifier process in case of an error. The process would just restart with its
last know sequence number. It significantly simplifies on the CouchDB end which is good for
reliability. I think the extra step to go for the process is not too bad.

@Robert so you query _all_docs_by_seq with a startkey and endkey? Why not just drop the endkey?

> Include sequence number in update notifications
> -----------------------------------------------
>                 Key: COUCHDB-290
>                 URL:
>             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.

View raw message