[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2015-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on COUCHDB-1415:
-

Github user davisp commented on the pull request:

https://github.com/apache/couchdb/pull/98#issuecomment-85254598
  
I'm pretty sure the underlying bug is fixed in 2.0. Might want to revisit 
the docs on this.


> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Fix For: 2.0.0
>
> Attachments: patch
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2014-06-30 Thread Robert Newson (JIRA)

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

Robert Newson commented on COUCHDB-1415:


I can't say beyond "2014" but people are working on it constantly.

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Fix For: 2.0.0
>
> Attachments: patch
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2014-06-30 Thread Tomas Novysedlak (JIRA)

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

Tomas Novysedlak commented on COUCHDB-1415:
---

That's good news, thank you. Is there any ETA for v 2.0?

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Fix For: 2.0.0
>
> Attachments: patch
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2014-06-27 Thread Robert Newson (JIRA)

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

Robert Newson commented on COUCHDB-1415:


It'll certainly be part of 2.0 which is our next release (unless we have to do 
a security-related patch to 1.6.0).


> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Attachments: patch
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2014-06-27 Thread Tomas Novysedlak (JIRA)

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

Tomas Novysedlak commented on COUCHDB-1415:
---

Gentlemen,

  Thanks to Cloudant a fix for this one is out for a while now. Are there any 
plans to merge it into the official release? If yes what it the estimate? 
Please advise.

Thank you,
  Tomas

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Attachments: patch
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-22 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on COUCHDB-1415:
--

Commit f990037388909a6d6307d7396e8c6274f282e563 in branch 
refs/heads/1912-troubleshooting-guide from [~kxepal]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=f990037 ]

Add solution for COUCHDB-1415 issue by Eric Ross.


> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-21 Thread Eric Ross (JIRA)

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

Eric Ross commented on COUCHDB-1415:


I updated the docs.  It's sitting as pull request #98 on github.

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-09 Thread Eric Ross (JIRA)

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

Eric Ross commented on COUCHDB-1415:


Thanks Lance,

I will give the updated_at a try and add it to the API documentation this 
weekend as a workaround.

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-08 Thread Lance Carlson (JIRA)

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

Lance Carlson commented on COUCHDB-1415:


That would be one way to do the salt. I was just adding a key to the doc called 
updated_at with the current time stamp

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-08 Thread Eric Ross (JIRA)

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

Eric Ross commented on COUCHDB-1415:


I was creating an IPC communication library where I was creating semaphores 
that distributed processes can share.  Each semaphore was named via the _id and 
went through a create, (acquire/release), delete lifecycle.  During unit 
testing which did frequent create/deletes I stumbled on this problem.

I was slightly confused by the "salt" reference.  Does this mean appending some 
random data to your key so that you don't re-use the same key and consequently 
avoid the whole problem?

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-08 Thread Dave Cottlehuber (JIRA)

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

Dave Cottlehuber commented on COUCHDB-1415:
---

[~eric ross] thanks that would be appreciated. 
https://github.com/apache/couchdb/blob/master/share/doc/src/contributing.rst 
has notes on how to do this, feel free to ask any questions. An attached patch 
is also fine if you are not yet a git user.

Both yourself and [~lancecarlson], does this bug come up in *real_world* usage? 
I'm trying to imagine a situation where I add & delete the same content 
furiously in practice, and I can't think of one that actually makes sense (i.e. 
fits with the grain of couchdb). I'd either use redis for this type of frequent 
state changing transaction, or consider using something that preserves the 
transaction history.

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-10-07 Thread Eric Ross (JIRA)

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

Eric Ross commented on COUCHDB-1415:


Since the fix is obviously not easy to implement and is slow in coming, it 
would be nice to add some warning to the API docs that says not to do this when 
compactions are happening.  Seemingly random lost documents can greatly hinder 
the credibility of CouchDB (of which I am a serious fan).  Let me know if you 
want me to write something up for the docs.


> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2013-05-15 Thread Lance Carlson (JIRA)

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

Lance Carlson commented on COUCHDB-1415:


Just got bitten by this bug. Ended up recreating my database instead of adding 
some salt. 

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200

--
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


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2012-12-13 Thread Tomas Brambora (JIRA)

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

Tomas Brambora commented on COUCHDB-1415:
-

Any workarounds other than adding some salt to the doc?

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
>Assignee: Paul Joseph Davis
> Fix For: 1.3
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200

--
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


[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2012-02-23 Thread Paul Joseph Davis (Commented) (JIRA)

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

Paul Joseph Davis commented on COUCHDB-1415:


Should affect both as well as _bulk_docs. The actual issue is quite deep in the 
revision merging and conflict checks.

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
> Fix For: 1.3
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (COUCHDB-1415) Re-insering a document silently fails after compact is executed

2012-02-23 Thread James Howe (Commented) (JIRA)

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

James Howe commented on COUCHDB-1415:
-

Does this only happen when step 5 is a POST, or are PUTs affected too?

> Re-insering a document silently fails after compact is executed
> ---
>
> Key: COUCHDB-1415
> URL: https://issues.apache.org/jira/browse/COUCHDB-1415
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 1.1.1
> Environment: Tested on multiple linux platforms
>Reporter: Viktor Szabo
> Fix For: 1.3
>
>
> 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 '{"_id": "bug", "key": "value"}'
> 3 curl -X DELETE "$url/bug?rev=1-59414e77c768bc202142ac82c2f129de"
> 4 curl -X POST "$url/_compact"
> 5 curl -X POST $url -d '{"_id": "bug", "key": "value"}'
> 6 curl -X GET "$url/bug"
>   (bug here)
> 1 {"ok":true}
>   201
> 2 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 3 {"ok":true,"id":"bug","rev":"2-9b2e3bcc3752a3a952a3570b2ed4d27e"}
>   200
> 4 {"ok":true}
>   202
> 5 [{"ok":true,"id":"bug","rev":"1-59414e77c768bc202142ac82c2f129de"}]
>   201
> 6 {"error":"not_found","reason":"deleted"}
>   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 {"_id":"bug","_rev":"3-674f864b73df1c80925e48436e21d550","key":"value"}
>   200

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira