This sounds like COUCHDB-1415
(https://issues.apache.org/jira/browse/COUCHDB-1415). Did you sometimes compact
while testing?
B.
On 5 Jul 2012, at 00:12, Matt Cheers wrote:
> OK.
>
> Formatting will get ugly but you'll be able to re-produce this just by
> running the .sh script. In running this script repeatedly, unfortunately
> i can't see a pattern to it. might work 50 times in a row then fail.
>
> Outputs on failure ----------------------
>
> ~ $ ./keys.sh
> **1 GET**
> REV=177-a6a59f64678ba354cd540c5085905e78
> **2 DELETE**
> {"ok":true,"id":"ws-test-flaming-wot-key","rev":"178-14289d00448b56e7e8c4275aa3223f89"}
> **3 GET**
> {"error":"not_found","reason":"deleted"}
> **4 PUT**
> {"ok":true,"id":"ws-test-flaming-wot-key","rev":"1-967a00dff5e02add41819138abb3284d"}
> {"error":"not_found","reason":"deleted"}
> **5 GET**
> {"error":"not_found","reason":"deleted"}
>
>
> Outputs on success ----------------------
>
> ~ $ ./keys.sh
> **1 GET**
> REV=175-793a0fa7a39d8bbc7bf700919a78e9d3
> **2 DELETE**
> {"ok":true,"id":"ws-test-flaming-wot-key","rev":"176-ce2a960178b0ed32539efe5e8854734f"}
> **3 GET**
> {"error":"not_found","reason":"deleted"}
> **4 PUT**
> {"ok":true,"id":"ws-test-flaming-wot-key","rev":"177-a6a59f64678ba354cd540c5085905e78"}
> {"_id":"ws-test-flaming-wot-key","_rev":"177-a6a59f64678ba354cd540c5085905e78"}
> **5 GET**
> {"_id":"ws-test-flaming-wot-key","_rev":"177-a6a59f64678ba354cd540c5085905e78"}
>
> The keys.sh -------------------------------------------------------------
> #!/bin/bash
>
> echo "**1 GET**"
> export AREV=`curl -s -XGET
> 'http://ssp-db:5984/api_keys/ws-test-flaming-wot-key' | sed s/\"//g |
> sed s/:/,/g | sed s/\}//g | cut -d, -f4`
> echo REV=$AREV
>
> echo "**2 DELETE**"
> curl -XDELETE
> "http://ssp-db:5984/api_keys/ws-test-flaming-wot-key?rev=${AREV}"
>
> echo "**3 GET**"
> curl -XGET 'http://ssp-db:5984/api_keys/ws-test-flaming-wot-key'
>
> echo "**4 PUT**"
> curl -XPUT 'http://ssp-db:5984/api_keys/ws-test-flaming-wot-key' -H
> 'content-type:application/json' -d @key.json; curl -XGET
> 'http://ssp-db:5984/api_keys/ws-test-flaming-wot-key'
>
> echo "**5 GET**"
> curl -XGET 'http://ssp-db:5984/api_keys/ws-test-flaming-wot-key'
>
>
>
> On 04/07/12 15:41, Paul Davis wrote:
>> Weirdness. Can you try and distill this down to a few curl commands?
>> It would seem like a bug but I can't for the life of me pin it down
>> exactly from your reports.
>>
>> On Wed, Jul 4, 2012 at 1:23 AM, Matt Cheers <[email protected]>
>> wrote:
>>> Apologies Paul, now with correct key and /snipped data.
>>>
>>> ---------------------------------------------------
>>>
>>> curl -a --raw
>>> http://10.100.169.99:5984/api_keys/ws-test-flaming-wot-key?conflicts=true
>>>
>>> {"_id":"ws-test-flaming-wot-key","_rev":"29-f8ff63465214118dc98599a96b7cc38b","application":"search","type":"api_key"}
>>>
>>> ----------------------------------------------------
>>>
>>> curl -a --raw
>>> http://10.100.169.99:5984/api_keys/ws-test-flaming-wot-key?open_revs=all
>>> 22
>>> --9242f167a584c70b9a784ded2989c115
>>> 24
>>>
>>> Content-Type: application/json
>>>
>>>
>>> f5
>>> {"_id":"ws-test-flaming-wot-key","_rev":"29-f8ff63465214118dc98599a96b7cc38b","application":"search","type":"api_key"}
>>> 24
>>>
>>> --9242f167a584c70b9a784ded2989c115
>>> 2
>>> --
>>> 0
>>>
>>>
>>>
>>> On 04/07/12 14:58, Paul Davis wrote:
>>>> That output looks quite odd. Can you try with a -v --raw on those curl
>>>> commands?
>>>>
>>>> On Wed, Jul 4, 2012 at 12:11 AM, Matt Cheers<[email protected]>
>>>> wrote:
>>>>> On 04/07/12 13:40, Paul Davis wrote:
>>>>>> What's the output of these two commands?
>>>>>>
>>>>>> curl http://10.100.169.99:5984/api_keys/test-key?conflicts=true
>>>>>> curl http://10.100.169.99:5984/api_keys/test-key?open_revs=all
>>>>>
>>>>> curl http://10.100.169.99:5984/api_keys/test-key?conflicts=true
>>>>>
>>>>> {"_id":"test-key","_rev":"29-f8ff63465214118dc98599a96b7cc38b"}
>>>>>
>>>>>
>>>>> curl http://10.100.169.99:5984/api_keys/test-key?open_revs=all
>>>>>
>>>>> --387f0371345be7f079ea1577dae1e346
>>>>> Content-Type: application/json
>>>>>
>>>>> {"_id":"test-key","_rev":"29-f8ff63465214118dc98599a96b7cc38b"}
>>>>> --387f0371345be7f079ea1577dae1e346--
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> This email (including any attachments) is confidential and may be
>>>>> privileged. If you have received it in error, please notify the sender by
>>>>> return email and delete this message from your system. Any unauthorised
>>>>> use
>>>>> or dissemination of this message in whole or in part is strictly
>>>>> prohibited.
>>>>> Please note that emails are susceptible to change and we will not be
>>>>> liable
>>>>> for the improper or incomplete transmission of the information contained
>>>>> in
>>>>> this communication nor for any delay in its receipt or damage to your
>>>>> system. We do not guarantee that the integrity of this communication has
>>>>> been maintained nor that this communication is free of viruses,
>>>>> interceptions or interference.
>>>
>>>
>>> This email (including any attachments) is confidential and may be
>>> privileged. If you have received it in error, please notify the sender by
>>> return email and delete this message from your system. Any unauthorised use
>>> or dissemination of this message in whole or in part is strictly prohibited.
>>> Please note that emails are susceptible to change and we will not be liable
>>> for the improper or incomplete transmission of the information contained in
>>> this communication nor for any delay in its receipt or damage to your
>>> system. We do not guarantee that the integrity of this communication has
>>> been maintained nor that this communication is free of viruses,
>>> interceptions or interference.
>
>
>
> This email (including any attachments) is confidential and may be privileged.
> If you have received it in error, please notify the sender by return email
> and delete this message from your system. Any unauthorised use or
> dissemination of this message in whole or in part is strictly prohibited.
> Please note that emails are susceptible to change and we will not be liable
> for the improper or incomplete transmission of the information contained in
> this communication nor for any delay in its receipt or damage to your system.
> We do not guarantee that the integrity of this communication has been
> maintained nor that this communication is free of viruses, interceptions or
> interference.