Assuming you mean db_update_notification (and not _update handlers, which are only called by clients) then, yes, they are triggered whenever a db is updated. This sequence of events leads you to miss an update, though;
1) Db updated 2) update notification fires 3) compaction occurs 4) processing update notification fetches doc At step 3, all old revisions were met. Since the triggering of the update notification and the subsequent exporting of the item are not instantaneous, a window of data loss opens. Storing old versions as attachments is a solid solution. B. On 9 November 2011 12:30, Alexander Shorin <[email protected]> wrote: > On Wed, Nov 9, 2011 at 3:01 PM, Robert Newson <[email protected]> wrote: >> The suggestion to use an update notification handler to trigger >> copying into a VCS is dangerous, as it is not guaranteed to get all >> your changes (consider compaction running while you're doing this, you >> could easily miss a revision). > > So update handlers aren't be triggered on each document updating? Or > compaction prevents any update notifications? > Could you explain in details why it could be dangerous? > > Idea with storing previous revisions within same document looks good > until changes are few and document is smaller. However, maybe storing > only json-patches could dramatically reduce total document size. > > -- > ,,,^..^,,, >
