Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ignore 'compacted' events and others #16

@regnete

Description

@regnete

https://github.com/jo/couch-daemon/blob/master/lib/dbs.js#L77 should be changed:

        if (change.type === 'deleted' || change.type === 'created')
          push(null, _.extend({ stream: 'dbs' }, change));

The change avoids unneccesary pushes.

We are running into serious problems with the following scenario: When a user logs in the first time, we create a user specific couch db and insert some design documents to that db. this is realized via a seperate node process with nano.

In this case, the couch-daemon (we use couchmagick) gets a massive bulk of events (creation of new db, updates for several design documents, etc.). I don't know why, but then the new db is not watched by couch-daemon, if if the dbs name is covered by the whitelist (/.*/ on our case).

Applying the above patch avoids the problem. I created a pull request: #17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions