From user-return-4111-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Mar 20 12:51:16 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 88965 invoked from network); 20 Mar 2009 12:51:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 12:51:16 -0000 Received: (qmail 1444 invoked by uid 500); 20 Mar 2009 12:51:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 1408 invoked by uid 500); 20 Mar 2009 12:51:10 -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 1397 invoked by uid 99); 20 Mar 2009 12:51:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 05:51:09 -0700 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of b.candler@pobox.com designates 208.72.237.25 as permitted sender) Received: from [208.72.237.25] (HELO sasl.smtp.pobox.com) (208.72.237.25) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 12:51:01 +0000 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 27CD375BB for ; Fri, 20 Mar 2009 08:50:35 -0400 (EDT) Received: from mappit (unknown [80.45.95.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id AB11975BA for ; Fri, 20 Mar 2009 08:50:34 -0400 (EDT) Received: from brian by mappit with local (Exim 4.69) (envelope-from ) id 1LkeBF-0004mc-5A for user@couchdb.apache.org; Fri, 20 Mar 2009 12:50:33 +0000 Date: Fri, 20 Mar 2009 12:50:33 +0000 From: Brian Candler To: user@couchdb.apache.org Subject: Re: Doc missing from view Message-ID: <20090320125033.GA17568@uk.tiscali.com> References: <20090320113723.GA15365@uk.tiscali.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <20090320113723.GA15365@uk.tiscali.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Pobox-Relay-ID: B46B8374-154D-11DE-A07E-C5D912508E2D-28021239!a-sasl-quonix.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline After going through my session transcripts I'm now able to replicate this reliably, and it looks to me very much like a couchdb problem. I replicated it first using Ruby/CouchRest, and then as a pure shell script. Both are attached. When I run this, I see the output of the "all" and "by_foo" views are empty. However if I comment out one of the document updates, so that the second one doesn't fail with a conflict, then the view works just fine. So somehow, a document update which was rejected due to an incorrect _rev has caused the entire document to become invisible to the view. Regards, Brian. --UugvWAfsgieZRqgk Content-Type: application/x-sh Content-Disposition: attachment; filename="view2.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A#set -x=0A=0AHOST1=3Dhttp://localhost:5984=0ALOCAL1=3Dsampledb= =0ADB1=3D"$HOST1/$LOCAL1"=0A=0Acurl -X DELETE "$DB1"=0Acurl -X PUT "$DB1"= =0A=0Aresp=3D`curl -sX PUT -d '{"couchrest-type":"Foo","wibble":"bibble","f= oo":"bar"}' "${DB1}/argh"`=0Arev=3D`expr "$resp" : '.*"rev":"\([^"]*\)"'`= =0A=0Acurl -sX PUT -T - "${DB1}/argh" <"bibble","foo"=>"bar") f.save! id = f.id f = Foo.get(id) g = Foo.get(id) f.save! # (X) begin g.save! # (Y) rescue RestClient::RequestFailed # 409 end Foo.view_by :foo p Foo.by_foo p Foo.all --UugvWAfsgieZRqgk--