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

Klaus Trainer commented on COUCHDB-902:
---------------------------------------

I just discovered that this issue is a bit trickier...

Simply pruning #doc.revs tree doesn't seem to work for updates with attachments.

When having multiple concurrent writers trying to attach a file to the same 
version, it's possible that more than one response with status code 201 and the 
same update sequence number is returned, even though only the first update 
succeeded for for real


Here an excerpt from my logs.

CouchDB log:

[info] [<0.378.0>] 127.0.0.1 - - 'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/134095825
 201

[info] [<0.378.0>] 127.0.0.1 - - 'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/17641740
 201

[info] [<0.377.0>] 127.0.0.1 - - 'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/132734222
 201

[info] [<0.376.0>] 127.0.0.1 - - 'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/114219547
 201

Client log:

'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/134095825
 "85-31c1a9fb50b253aa68ac632f6e1a7626"

'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/17641740
 "86-1e38b77c2d0f1160b12cb8f48d2506bc"

'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/132734222
 "86-f907a3b56661163f9fa5aeb732a282f2"

'PUT' 
/couch_planet_test/http%3a%2f%2ffeedproxy.google.com%2f%7er%2freadwriteweb%2f%7e3%2fdieZ1tlfbVo%2fhow-to-deploy-ipv6-securely.php/114219547
 "86-a81f66b089296771b23aa6b04f5abb28"


This is reproducible. I'm now trying to understand why it occurs for updates 
with attachment, but not for updates of document bodies (where #doc.revs only 
consists of the current and new rev as well). Maybe I can find a fix then.

> Attachments that have recovered from conflict do not accept attachments.
> ------------------------------------------------------------------------
>
>                 Key: COUCHDB-902
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-902
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>         Environment: trunk
>            Reporter: Paul Joseph Davis
>            Priority: Critical
>         Attachments: 0001-Fix-COUCHDB-902.patch, couchdb-902-test-case.py
>
>
> Apparently if a document has been in a conflict, they will reject requests to 
> add an attachment with a conflict error.
> I've tracked this down to couch_db_updater.erl line 501, but I'm not too 
> familiar with this part of the code so I figured I'd fill out a ticket in 
> case anyone else can go through this more quickly than me.
> Sure would be nice if I could attach a file when I create an issue...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to