Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 95126 invoked from network); 28 Nov 2009 23:16:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Nov 2009 23:16:07 -0000 Received: (qmail 95019 invoked by uid 500); 28 Nov 2009 23:16:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 94930 invoked by uid 500); 28 Nov 2009 23:16:05 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 94920 invoked by uid 99); 28 Nov 2009 23:16:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2009 23:16:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jchris@gmail.com designates 209.85.216.195 as permitted sender) Received: from [209.85.216.195] (HELO mail-px0-f195.google.com) (209.85.216.195) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2009 23:15:55 +0000 Received: by pxi33 with SMTP id 33so1697229pxi.28 for ; Sat, 28 Nov 2009 15:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=zB2PYXTe97vcVFyDh68cTeiwpECA5U3U/MorhFGio0g=; b=YBo1K01XxyCpd3/zaVL4yBi4yquBhCjksqPr1gwF8O+MR4VyN77he9bFH1MY7N2t0U lR/PVFkTq3lHL6M8GVWKkvY/0T/hNOJKO7qE9aAk9xVqdE3GbdJeXDaR7Q0uScCQWSOg HEUol0SQaZDD3jp6Mc3K7Ln1QVrjjLBJfw0rI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=diXHNgSMc+R+paCar1H2LdLw/A7k0paNeM6enzZOxd6IbSiBryQgGIv5pIvvG0ue8A 7l34jXQlhRkM/ZtkREL0ezVgjBo2TVknQCL7YA0zBFIhxHH/Li7yp4Vf+HyALhaREoAB TjVXtls3zm08jo6CqiqCTyxLXMJnHvOhK23tU= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.142.9.37 with SMTP id 37mr284148wfi.116.1259450132749; Sat, 28 Nov 2009 15:15:32 -0800 (PST) In-Reply-To: <4B119BD8.3080604@rogerbinns.com> References: <20091125.141222.19712.0@webmail18.dca.untd.com> <560501C7-0F0C-451D-8BAF-8932A967FCB6@dionne-associates.com> <4B119BD8.3080604@rogerbinns.com> Date: Sat, 28 Nov 2009 15:15:32 -0800 X-Google-Sender-Auth: 1b8d45a27b49b3ac Message-ID: Subject: Re: filters for _changes dont seem to work From: Chris Anderson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Nov 28, 2009 at 1:53 PM, Roger Binns 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. =A0For my testing it is documents being created and destr= oyed > 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. =A0The timeo= ut > just sets the maximum amount of time before the http response completes. = =A0If > 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. =A0I = am > using heartbeat which works as documented. > > While looking at that code something that would be very nice is if the ht= tp > response does not complete until there is at least one change *after* the > filter has been applied (or a timeout etc). =A0Currently 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 > =3DokOU > -----END PGP SIGNATURE----- > --=20 Chris Anderson http://jchrisa.net http://couch.io