Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 89438 invoked from network); 12 Jan 2009 19:19:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 19:19:10 -0000 Received: (qmail 76902 invoked by uid 500); 12 Jan 2009 19:19:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76872 invoked by uid 500); 12 Jan 2009 19:19:08 -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 76861 invoked by uid 99); 12 Jan 2009 19:19:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 11:19:08 -0800 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 paul.joseph.davis@gmail.com designates 209.85.198.239 as permitted sender) Received: from [209.85.198.239] (HELO rv-out-0506.google.com) (209.85.198.239) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 19:18:58 +0000 Received: by rv-out-0506.google.com with SMTP id g37so10692794rvb.35 for ; Mon, 12 Jan 2009 11:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=6h7HZ3Z0CrDxELrYJTDn3D+RBkPUSSNSoQV0whqUVWg=; b=KJJKhGYoNUHoyntixZVb3Sf4SuD9aefzqUjQm9FcV+eJgMjvwNAZSvK1xekPDFKxl1 Br4/OL0YF5ijv4YdRBHJ2woy0Abc/e9i8DtNBi16FkmsxnZWOLlx8mKdTyU+k5blhnam DuDGY7C3AtN5T8d63bdFu/fcAWJwc1dcIsNy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=iJKR2oGZs6egDHjAmLN90vyGVkk2VWOXgLNz71bkFwM9kDvDAsUVyRmny+HsqIOSxC e/+tVn7+b1k0JNn93wrmX+pVW+rzjfVOrX3BmoOuku5vBggFOkVxfKiPpeQ5BufXUOto mX4J2vn5iDtuy1XVyhXAYJ/Hi0TkfIm8z63O8= Received: by 10.141.115.6 with SMTP id s6mr14851055rvm.58.1231787916342; Mon, 12 Jan 2009 11:18:36 -0800 (PST) Received: by 10.141.75.15 with HTTP; Mon, 12 Jan 2009 11:18:36 -0800 (PST) Message-ID: Date: Mon, 12 Jan 2009 14:18:36 -0500 From: "Paul Davis" To: user@couchdb.apache.org Subject: Re: Error when running two requests to same view simultaneously In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20090110164853.GI10545@delora.autosys.us> X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jan 12, 2009 at 2:10 PM, John Bartak wrote: > It appears that the latest code (0.9.0a733848) does fix the crash of the server. I now get back a result string that has an error value of missing instead of the document: > > {"total_rows":2,"offset":0,"rows":[ > {"id":"09e2fb54e77545c0aec61578fe041965","key":["repository.repositoryfile","ownerid","filename"],"value":null,"error":"missing"}, > {"id":"8cc55e26dfb047b09f222d7967f2a047","key":["repository.repositoryfile", "ownerid","filename"],"value":null,"doc":{"_id":"8cc55e26dfb047b09f222d7967f2a047","_rev":"2138313893","OwnerId":"ownerId","Name":"filename"}} > ]} > > I'll have to update my code to handle that, but that's no big deal. > > Unfortunately, I don't get back 412's when two threads attempt to update the same revision of a document simultaneously. This happens for both the bulk_docs api and the standard PUT api: > > [info] [<0.3374.0>] 192.168.200.1 - - 'GET' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce?rev=4134090793 200 > [info] [<0.3371.0>] 192.168.200.1 - - 'GET' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce?rev=4134090793 200 > [info] [<0.3371.0>] 192.168.200.1 - - 'PUT' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce 201 > [info] [<0.3374.0>] 192.168.200.1 - - 'PUT' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce 201 > > In the two threads that I have running, I first get the document I want to revise and I then update the revision. > I have a sneaking suspicion that this is from the code that damien commited a few days ago. Try adding a head like [1] to each of your requests to check the status of each. Also, in your example, to double check that this is expected behavior, you should look at that document and verify it has a _conflict attribute. Remember that we're working with eventual consistency here. This type of thing is expected and it's your app's responsibility to figure things out. [1] X-Couch-Full-Commit: true HTH, Paul Davis > > > -----Original Message----- > From: Chris Anderson [mailto:jchris@gmail.com] > Sent: Saturday, January 10, 2009 9:54 AM > To: user@couchdb.apache.org > Subject: Re: Error when running two requests to same view simultaneously > > On Sat, Jan 10, 2009 at 8:48 AM, Michael McDaniel wrote: >> The short answer is that there is no function couch_doc:to_json_doc/2 >> that accepts the arguments ( {not_found, missing}, [] ) gracefully >> >>> {function_clause, >>> [{couch_doc,to_json_obj,[{not_found,missing},[]]}, >>> ... >> > > The problem seems to have been in the error handling in the > include_docs code. Do you mind updating to the latest trunk and > attempting to recreate the error? It should be fixed. > > > -- > Chris Anderson > http://jchris.mfdz.com >