Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 87341 invoked from network); 17 Jan 2011 19:48:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jan 2011 19:48:11 -0000 Received: (qmail 11735 invoked by uid 500); 17 Jan 2011 19:48:10 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11294 invoked by uid 500); 17 Jan 2011 19:48:09 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 10979 invoked by uid 99); 17 Jan 2011 19:48:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 19:48:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 19:48:07 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0HJlji6022112 for ; Mon, 17 Jan 2011 19:47:45 GMT Message-ID: <14242700.21231295293665419.JavaMail.jira@thor> Date: Mon, 17 Jan 2011 14:47:45 -0500 (EST) From: "Adam Kocoloski (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-902) Attachments that have recovered from conflict do not accept attachments. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982824#action_12982824 ] Adam Kocoloski commented on COUCHDB-902: ---------------------------------------- The patch I'm proposing to couch_httpd_db is pretty simple: diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 1767d9c..02e1aa4 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -1020,8 +1020,10 @@ db_attachment_req(#httpd{method=Method,mochi_req=MochiReq}=Req, Db, DocId, FileN end end, - #doc{atts=Atts} = Doc, + #doc{atts=Atts, revs = {Pos, Revs}} = Doc, DocEdited = Doc#doc{ + % prune revision list as a workaround for key tree bug (COUCHDB-902) + revs = case Revs of [] -> {Pos, []}; _ -> {Pos, [hd(Revs)]} end, atts = NewAtt ++ [A || A <- Atts, A#att.name /= FileName] }, {ok, UpdatedRev} = couch_db:update_doc(Db, DocEdited, []), However, my current stumbling block is that I cannot get attachment_conflicts.js to fail on a stock 1.0.x build. I haven't looked into it further yet. Will look again in a couple of hours. > 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 > Fix For: 1.0.2, 1.1 > > 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.