incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Hoisie <hoi...@gmail.com>
Subject Weird document update conflict on delete
Date Mon, 11 Jan 2010 17:00:48 GMT
Hi,

I'm writing a couchdb library for Go (
http://github.com/hoisie/gocouch ) , and I'm running into this bizarre
issue while testing the document delete method. This sequence of
requests causes a document update conflict:

1. check if a database exists : HEAD http://127.0.0.1:5984/test123
2. create a new database: PUT http://127.0.0.1:5984/test123
3. add a document to the database POST http://127.0.0.1:5984/test123/
  --> docid 2b866715d560a2e62e11df4cfcf7258a
  --> revid 1-c7176253456a2d0378c55e597ed96ad3
4. delete the same document form the database:
DELETE http://127.0.0.1:5984/test123/2b866715d560a2e62e11df4cfcf7258a?rev=1-c7176253456a2d0378c55e597ed96ad3
--> {"error":"conflict","reason":"Document update conflict."}

I believe this fairly simple sequence of events should work. Is there
anything here that's not allowed? I believe both the POST and DELETE
are run on the same http connection. Could that be causing problems?

I'm running CouchDBX 0.8 ( couchdb 0.10.0) on mac os x 10.6.

Thanks,
Mike

Mime
View raw message