[
https://issues.apache.org/jira/browse/COUCHDB-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043903#comment-13043903
]
Nuutti Kotivuori commented on COUCHDB-1184:
-------------------------------------------
Apparently just plain PUT of a design document that has "_rev" present fails
with the same error:
$ curl -H "Content-type: application/json" -X PUT --data
'{"_id":"_design/a","_rev":"1-2f4a8d26d103e914167052aea70a5031"}'
http://localhost:5984/repltest/_design/a
{"error":"conflict","reason":"Document update conflict."}
Where as a plain PUT with a non-design document with "_rev" present works just
fine:
$ curl -H "Content-type: application/json" -X PUT --data
'{"_id":"x","_rev":"1-2f4a8d26d103e914167052aea70a5031"}'
http://localhost:5984/repltest/x
{"ok":true,"id":"x","rev":"2-4d0fe113895b8471147756712e3f42bb"}
> Bulk insert of design documents fails with conflict if the documents contain
> "_rev" when they do not exist in the database
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1184
> URL: https://issues.apache.org/jira/browse/COUCHDB-1184
> Project: CouchDB
> Issue Type: Bug
> Reporter: Nuutti Kotivuori
>
> First a simple example to reproduce:
> $ curl -X PUT http://localhost:5984/repltest
> {"ok":true}
> $ curl -H "Content-type: application/json" -X POST --data
> '{"docs":[{"_id":"_design/a","_rev":"1-2f4a8d26d103e914167052aea70a5031"}]}'
> http://localhost:5984/repltest/_bulk_docs
> [{"id":"_design/a","error":"conflict","reason":"Document update conflict."}]
> So, inserting a previously non-existing design document in to a database via
> bulk docs post fails the inserted design document has a "_rev" member.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira