couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Bartak <>
Subject RE: Error when running two requests to same view simultaneously
Date Mon, 12 Jan 2009 19:10:38 GMT
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:

{"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

[info] [<0.3374.0>] - - 'GET' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce?rev=4134090793
[info] [<0.3371.0>] - - 'GET' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce?rev=4134090793
[info] [<0.3371.0>] - - 'PUT' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce
[info] [<0.3374.0>] - - 'PUT' /fileinttests_20090112_105825_501_1818439740/473dccb50cb54a57abe19e7687c491ce

In the two threads that I have running, I first get the document I want to revise and I then
update the revision.

-----Original Message-----
From: Chris Anderson []
Sent: Saturday, January 10, 2009 9:54 AM
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

View raw message