You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2013/08/23 08:33:54 UTC

[jira] [Commented] (COUCHDB-1878) Couchdb silently fails when I try to delete a document using a bulk operation with all_or_nothing set to true and there is a conflict

    [ https://issues.apache.org/jira/browse/COUCHDB-1878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13748335#comment-13748335 ] 

Robert Newson commented on COUCHDB-1878:
----------------------------------------

all_or_nothing:true means that CouchDB will introduce a conflict rather than fail the update with a 409 (the default behavior). If there are two branches, of the same length, but one is marked deleted and the other is not, then CouchDB's 'winner' algorithm will choose the non-deleted one. I think, therefore, that CouchDB is working just fine, but please confirm that the document in question does have a conflict for revision 12-178cd8c073a6f7a8a9c794da39a461ff using 'curl localhost:5984/dbname/docid?meta=true'.

Simpler: "silently fail" is really "introduces losing conflict which are, by default, invisible".

                
> Couchdb silently fails when I try to delete a document using a bulk operation with all_or_nothing set to true and there is a conflict
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-1878
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1878
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Arpit
>
> curl -X POST http://127.0.0.1:5984/db/_bulk_docs -H 'Content-Type: application/json' -d @update.json
> update.json
> {
>     "all_or_nothing": true,
>     "docs": [
> 	{
>             "_id": "1",
> 			"_rev": "11-91a1192c89eb5f0e4c6ec5fc30d359d8",
> 			"_deleted": true,
>             "text": "asdad"
>         }
> 		]
> }
> It gives [{"ok":true,"id":"1","rev":"12-178cd8c073a6f7a8a9c794da39a461ff"}] but doesnt delete the document !
> If there's a conflict then this command doesnt delete the doc in db

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira