summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-09-25 10:12:24 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-09-25 10:12:24 +0000
commit09baa8c43d241cee6b891e5174a7fc6d5e4b3fd2 (patch)
tree06b3381dcd1a5c0b3752a7b84a58af7b8f5ee1fe /src
parent911344d6d1d9ef93a7f68d5bce62fdc10a6033a3 (diff)
Merged revision 1001184 from trunk:
Bug fix: a user context record was being used instead of a PID. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1001186 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_db.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index 7678f6ca..2a045f85 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -755,7 +755,7 @@ collect_results(UpdatePid, MRef, ResultsAcc) ->
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=UpdatePid, user_ctx=Ctx}=Db, DocBuckets,
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),