couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Sobolev <mikhail.sobo...@gmail.com>
Subject Re: couchdb.http.PreconditionFailed: ('missing_stub', ...)
Date Tue, 06 Apr 2010 18:17:35 GMT
Hi Jan,

On Tue, Apr 6, 2010 at 5:21 PM, Jan Lehnardt <jan@apache.org> wrote:
> On 5 Apr 2010, at 22:58, Mikhail Sobolev wrote:
>> I just upgraded to couchdb 0.11 and my application fails with
>>    couchdb.http.PreconditionFailed: ('missing_stub', ...)
>>
>> What could lead to such an error?
>
> Some code :D — What are you trying to do? :)
This idea crossed my mind :)

Essentially, I'm doing the following:

1. create a document with props
2. save it
3. add an attanchment
4. update some document props related to the attachment
5. save the updated document

3-5 are repeated several times.

At 3 & 5, the _rev is updated properly.  At 3 with the previous
version of couchdb (0.10.1) a simple 'trick" of adding/updating
_attachment ("filename": { "stub": true}) was working just fine.  With
the new version it bails out with the message in the subject.  The
attached file shows what I'm I doing the 'head' of couchdb-python
module.  (The previous version did not have 'revpos=doc.rev'.)

> My bet is on you try updating or deleting a document without passing in a valid _rev.
The code used to work.

--
Misha

Mime
View raw message