Design documents in bulk inserts cause change in behavior for normal documents in same bulk insert --------------------------------------------------------------------------------------------------
Key: COUCHDB-1185 URL: https://issues.apache.org/jira/browse/COUCHDB-1185 Project: CouchDB Issue Type: Bug Affects Versions: 0.11 Reporter: Nuutti Kotivuori First, a reproduction recipe: $ curl -X PUT http://localhost:5984/repltest {"ok":true} $ curl -H "Content-type: application/json" -X PUT --data '{"_id":"_design/a"}' http://localhost:5984/repltest/_design/a {"ok":true,"id":"_design/a","rev":"1-967a00dff5e02add41819138abb3284d"} $ curl -H "Content-type: application/json" -X POST --data '{"docs":[{"_id":"_design/a","_rev":"1-967a00dff5e02add41819138abb3284d"},{"_id":"b","_rev":"1-2f4a8d26d103e914167052aea70a5031"}]}' http://localhost:5984/repltest/_bulk_docs [{"id":"_design/a","rev":"2-7051cbe5c8faecd085a3fa619e6e6337"},{"id":"b","error":"conflict","reason":"Document update conflict."}] $ curl -H "Content-type: application/json" -X POST --data '{"docs":[{"_id":"b","_rev":"1-2f4a8d26d103e914167052aea70a5031"}]}' http://localhost:5984/repltest/_bulk_docs [{"id":"b","rev":"2-4d0fe113895b8471147756712e3f42bb"}] The first post failed, because it had a design document update in it, where as the second succeeded when it didn't. The first post succeeds if the other inserted document does not have "_rev" member. So, having a design document in a bulk inserts causes document conflicts for documents that have "_rev" set that are missing from the database currently. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira