Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 48960 invoked from network); 25 Sep 2010 10:12:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Sep 2010 10:12:51 -0000 Received: (qmail 93216 invoked by uid 500); 25 Sep 2010 10:12:51 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 93119 invoked by uid 500); 25 Sep 2010 10:12:49 -0000 Mailing-List: contact commits-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 commits@couchdb.apache.org Received: (qmail 93108 invoked by uid 99); 25 Sep 2010 10:12:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 10:12:48 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 10:12:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 19F6323889E9; Sat, 25 Sep 2010 10:12:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1001186 - /couchdb/branches/1.0.x/src/couchdb/couch_db.erl Date: Sat, 25 Sep 2010 10:12:25 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100925101225.19F6323889E9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fdmanana Date: Sat Sep 25 10:12:24 2010 New Revision: 1001186 URL: http://svn.apache.org/viewvc?rev=1001186&view=rev Log: Merged revision 1001184 from trunk: Bug fix: a user context record was being used instead of a PID. Modified: couchdb/branches/1.0.x/src/couchdb/couch_db.erl Modified: couchdb/branches/1.0.x/src/couchdb/couch_db.erl URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_db.erl?rev=1001186&r1=1001185&r2=1001186&view=diff ============================================================================== --- couchdb/branches/1.0.x/src/couchdb/couch_db.erl (original) +++ couchdb/branches/1.0.x/src/couchdb/couch_db.erl Sat Sep 25 10:12:24 2010 @@ -755,7 +755,7 @@ collect_results(UpdatePid, MRef, Results exit(Reason) end. -write_and_commit(#db{update_pid=UpdatePid, user_ctx=Ctx}=Db, DocBuckets, +write_and_commit(#db{update_pid=UpdatePid}=Db, DocBuckets, NonRepDocs, Options0) -> Options = set_commit_option(Options0), MergeConflicts = lists:member(merge_conflicts, Options), @@ -768,7 +768,7 @@ write_and_commit(#db{update_pid=UpdatePi retry -> % This can happen if the db file we wrote to was swapped out by % compaction. Retry by reopening the db and writing to the current file - {ok, Db2} = open_ref_counted(Db#db.main_pid, Ctx), + {ok, Db2} = open_ref_counted(Db#db.main_pid, self()), DocBuckets2 = [[doc_flush_atts(Doc, Db2#db.fd) || Doc <- Bucket] || Bucket <- DocBuckets], % We only retry once close(Db2),