incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
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 <rogerb@rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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
/_utils/script/test/changes.js

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:

http://issues.apache.org/jira/browse/COUCHDB-582

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

Thanks,
Chris



>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAksRm9gACgkQmOOfHg372QRJIACaAvEaSHrvbmT6CC1YSn6yT0fC
> yfwAoNZDqGTobyKuxR4iMG9na2/GBzXP
> =okOU
> -----END PGP SIGNATURE-----
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message