incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: filters for _changes dont seem to work
Date Sat, 28 Nov 2009 23:15:32 GMT
On Sat, Nov 28, 2009 at 1:53 PM, Roger Binns <> wrote:
> Hash: SHA1
> Sven Helmberger wrote:
>> You are not writing back documents with the same content, are you?
> In my case, no.  For my testing it is documents being created and destroyed
> which aren't been noticed by filter after they initially are.
> Robert Dionne wrote:
>> I just happened to be looking at the code that handles this and am
>> wondering if it's a timing issue. Could you try increasing the timeout
>> or not specifying it (the default looks to be 60s) and/or setting
>> delayed_commits to false in the config file.
>> I could be that the code that runs the filters is not getting the
>> notifications in time. I"m just speculating but it's an easy test to try.
> Changing delayed_commits to false did not make a difference.  The timeout
> just sets the maximum amount of time before the http response completes.  If
> not specified it is 60 seconds, works as expected when set to 10 seconds and
> when set to lots of 9's behaved as though it was set to 60 seconds.  I am
> using heartbeat which works as documented.
> While looking at that code something that would be very nice is if the http
> response does not complete until there is at least one change *after* the
> filter has been applied (or a timeout etc).  Currently the response
> completes if there is at least one change before the filter - I have the
> filter because I only care about .1% of my documents changing (filter on
> doc.type).

It sounds like this needs more testing. There is a test for filter in
the test suite and available on your CouchDB server at

There is an additional process optimization that needs to be done,
which should simplify the code base a little and perhaps flush these
bugs out as well.

Thanks for bringing this to our attention. Any patches you can make to
the test suite to show the errors would be extremely helpful.

I've also created a Jira ticket for the issue:

I'll look into it in the next few days.


> Roger
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> yfwAoNZDqGTobyKuxR4iMG9na2/GBzXP
> =okOU

Chris Anderson

View raw message