Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.1.1
-
None
-
Tested on multiple linux platforms
Description
When a document is re-inserted after a compact operation using the same contents it was originally created, the insert operation is silently ignored, leaving the client unaware of the fact it's document is not available in the database.
Can be reproduced using the following sequence of steps:
alias curl='curl -H "Content-Type: application/json"'
url="http://localhost:5984/database"
1 curl -X PUT $url
2 curl -X POST $url -d '
'
3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
4 curl -X POST "$url/_compact"
5 curl -X POST $url -d '
'
6 curl -X GET "$url/bug"
(bug here)
1
{"ok":true} 201
2 [
]
201
3
200
4
202
5 [
]
201
6
404
CouchDB shouldn't report "ok" on step 5 and then go on to claim that the doc is deleted. Also, it seems to work on second try:
7 curl -X POST $url -d '
{"_id": "bug", "key": "value"}'
8 curl -X GET "$url/bug"
7
{"ok":true,"id":"bug","rev":"3-674f864b73df1c80925e48436e21d550"} 201
8
200
Attachments
Attachments
Issue Links
- is duplicated by
-
COUCHDB-1770 Bulk save/update doesn't save the second time
- Resolved
-
COUCHDB-1905 PUT/GET/DELETE while compacting results in lost document.
- Resolved
-
COUCHDB-1436 Sometimes a newly created document does not appear in the database although operation for its creating returns "ok"=true
- Closed
- links to