You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2010/09/25 12:12:25 UTC
svn commit: r1001186 - /couchdb/branches/1.0.x/src/couchdb/couch_db.erl
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),