You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "André Bögge (JIRA)" <ji...@apache.org> on 2010/08/11 11:23:18 UTC
[jira] Created: (COUCHDB-853) Update conflict after recreating a
deleted document
Update conflict after recreating a deleted document
---------------------------------------------------
Key: COUCHDB-853
URL: https://issues.apache.org/jira/browse/COUCHDB-853
Project: CouchDB
Issue Type: Bug
Components: Database Core
Affects Versions: 0.11.1
Environment: Win Server 2008 R2, CouchDB 0.11.1
Reporter: André Bögge
Priority: Critical
The problem occurs after deleting and recreating a document. I got an update conflict writing the document after i recreated it.
curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
--> {"ok":true,"id":"test_doc_ABO","rev":"1-d51b77d476e0aad1f9990e9a85849740"}
D:\Programme\Curl>curl -X DELETE http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="1-d51b77d476e0aad1f9990e9a85849740"
--> {"ok":true,"id":"test_doc_ABO","rev":"2-282f9cf6e648dcce08c426ffbf04c635"}
D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
--> {"ok":true,"id":"test_doc_ABO","rev":"3-0c7606241b31f0566c527cd2a8c16367"}
D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="3-0c7606241b31f0566c527cd2a8c16367" -d "{\"kuerzel\":\"ABO\"}"
--> {"error":"conflict","reason":"Document update conflict."}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (COUCHDB-853) Update conflict after recreating a
deleted document
Posted by "André Bögge (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
André Bögge closed COUCHDB-853.
-------------------------------
Fix Version/s: 0.11.1
Resolution: Not A Problem
The command
curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"_rev\":\"3-0c7606241b31f0566c527cd2a8c16367\" , \"kuerzel\":\"ABO\"}"
works.
Thanks for your fast answer.
> Update conflict after recreating a deleted document
> ---------------------------------------------------
>
> Key: COUCHDB-853
> URL: https://issues.apache.org/jira/browse/COUCHDB-853
> Project: CouchDB
> Issue Type: Question
> Components: HTTP Interface
> Affects Versions: 0.11.1
> Environment: Win Server 2008 R2, CouchDB 0.11.1
> Reporter: André Bögge
> Priority: Trivial
> Fix For: 0.11.1
>
>
> The problem occurs after deleting and recreating a document. I got an update conflict writing the document after i recreated it.
> curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"1-d51b77d476e0aad1f9990e9a85849740"}
> D:\Programme\Curl>curl -X DELETE http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="1-d51b77d476e0aad1f9990e9a85849740"
> --> {"ok":true,"id":"test_doc_ABO","rev":"2-282f9cf6e648dcce08c426ffbf04c635"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"3-0c7606241b31f0566c527cd2a8c16367"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="3-0c7606241b31f0566c527cd2a8c16367" -d "{\"kuerzel\":\"ABO\"}"
> --> {"error":"conflict","reason":"Document update conflict."}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-853) Update conflict after recreating a
deleted document
Posted by "Klaus Trainer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897199#action_12897199 ]
Klaus Trainer commented on COUCHDB-853:
---------------------------------------
This behaviour has nothing to do with deleting and recreating a document. I also wouldn't call it a bug, since you need to specify the revision number in the PUT request's body instead of as a query parameter.
Accordingly, you put your PUT request better like this:
curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"_rev\":\"3-0c7606241b31f0566c527cd2a8c16367\" , \"kuerzel\":\"ABO\"}"
The first PUT request after the DELETE only succeeds, because after a DELETE, it isn't necessary to specify a revision number (which is quite reasonable). Anyway, the rev query parameter that you specified in the PUT request is ignored.
> Update conflict after recreating a deleted document
> ---------------------------------------------------
>
> Key: COUCHDB-853
> URL: https://issues.apache.org/jira/browse/COUCHDB-853
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 0.11.1
> Environment: Win Server 2008 R2, CouchDB 0.11.1
> Reporter: André Bögge
> Priority: Critical
>
> The problem occurs after deleting and recreating a document. I got an update conflict writing the document after i recreated it.
> curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"1-d51b77d476e0aad1f9990e9a85849740"}
> D:\Programme\Curl>curl -X DELETE http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="1-d51b77d476e0aad1f9990e9a85849740"
> --> {"ok":true,"id":"test_doc_ABO","rev":"2-282f9cf6e648dcce08c426ffbf04c635"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"3-0c7606241b31f0566c527cd2a8c16367"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="3-0c7606241b31f0566c527cd2a8c16367" -d "{\"kuerzel\":\"ABO\"}"
> --> {"error":"conflict","reason":"Document update conflict."}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-853) Update conflict after recreating a
deleted document
Posted by "André Bögge (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
André Bögge updated COUCHDB-853:
--------------------------------
Issue Type: Question (was: Bug)
Priority: Trivial (was: Critical)
Component/s: HTTP Interface
(was: Database Core)
> Update conflict after recreating a deleted document
> ---------------------------------------------------
>
> Key: COUCHDB-853
> URL: https://issues.apache.org/jira/browse/COUCHDB-853
> Project: CouchDB
> Issue Type: Question
> Components: HTTP Interface
> Affects Versions: 0.11.1
> Environment: Win Server 2008 R2, CouchDB 0.11.1
> Reporter: André Bögge
> Priority: Trivial
>
> The problem occurs after deleting and recreating a document. I got an update conflict writing the document after i recreated it.
> curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"1-d51b77d476e0aad1f9990e9a85849740"}
> D:\Programme\Curl>curl -X DELETE http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="1-d51b77d476e0aad1f9990e9a85849740"
> --> {"ok":true,"id":"test_doc_ABO","rev":"2-282f9cf6e648dcce08c426ffbf04c635"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":\"ABO\"}"
> --> {"ok":true,"id":"test_doc_ABO","rev":"3-0c7606241b31f0566c527cd2a8c16367"}
> D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO?rev="3-0c7606241b31f0566c527cd2a8c16367" -d "{\"kuerzel\":\"ABO\"}"
> --> {"error":"conflict","reason":"Document update conflict."}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.