Hi,

I use Ubuntu with CouchDB 0.10 (the most recent version available in the repository). When I create a document, delete it, and create a document with the same id but different content, I produce _deleted_conflicts.

Someone confirmed that this problem is also present in CouchDB 0.12. Is CouchDB 1.0.1 affected as well? ... Can I ignore this for the time being or does it have negative implications?


Here are the steps to replicate it:

// Create database "test-db"
$ curl -X "PUT" "http://localhost:5984/test-db";

// Create document with id "hello"
$ curl -X "PUT" -d '{"blah":"heee"}' "http://localhost:5984/test-db/hello";

// Delete the document (Replace {REVISION} with revision provided by the response when you created the document, do not put quotes around the revision)
$ curl -X "DELETE" "http://localhost:5984/test-db/hello?rev={REVISION}";

// Add document with id "hello" but different content than previously
$ curl -X "PUT" -d '{"blah":"bummer"}' "http://localhost:5984/test-db/hello";

// See if we created a conflict (Check if the field "_deleted_conflicts" is present)
$ curl -X "GET" "http://localhost:5984/test-db/hello?meta=true";


LOG
===

m...@laptop:~$ curl -X "PUT" "http://localhost:5984/test-db";
{"ok":true}

m...@laptop:~$ curl -X "PUT" -d '{"blah":"heee"}' "http://localhost:5984/test-db/hello";
{"ok":true,"id":"hello","rev":"1-eedd5293adfba3e6756d169279c9e258"}

m...@laptop:~$ curl -X "DELETE" "http://localhost:5984/test-db/hello?rev=1-eedd5293adfba3e6756d169279c9e258";
{"ok":true,"id":"hello","rev":"2-812b533fc2804799136e1a2835a2a11b"}

m...@laptop:~$ curl -X "PUT" -d '{"blah":"bummer"}' "http://localhost:5984/test-db/hello";
{"ok":true,"id":"hello","rev":"1-8f516938fadd326bee9940f267d91b30"}

m...@laptop:~$ curl -X "GET" "http://localhost:5984/test-db/hello?meta=true";
{"_id":"hello","_rev":"1-8f516938fadd326bee9940f267d91b30","blah":"bummer","_revs_info":[{"rev":"1-8f516938fadd326bee9940f267d91b30","status":"available"}],"_deleted_conflicts":["2-812b533fc2804799136e1a2835a2a11b"]}

Reply via email to