summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_db.erl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2010-03-15 22:00:48 +0000
committerDamien F. Katz <damien@apache.org>2010-03-15 22:00:48 +0000
commit17fd3e388668be4abf091b01f8f49db887bcddb5 (patch)
tree0cfca1418316f47ea7750a26f7cc18a1cbaaf87f /src/couchdb/couch_db.erl
parentf3303f24d376860a63ec735a1bc96c406473ad4f (diff)
Made the opening of databases asynchronous, so that requests to open databases that are already in the open database cache do not have to wait on the file system.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@923456 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.erl')
-rw-r--r--src/couchdb/couch_db.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index e3c7eaf9..2415e37c 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -92,9 +92,8 @@ ensure_full_commit(#db{update_pid=UpdatePid,instance_start_time=StartTime}) ->
close(#db{fd_ref_counter=RefCntr}) ->
couch_ref_counter:drop(RefCntr).
-open_ref_counted(MainPid, UserCtx) ->
- {ok, Db} = gen_server:call(MainPid, {open_ref_count, self()}),
- {ok, Db#db{user_ctx=UserCtx}}.
+open_ref_counted(MainPid, OpenedPid) ->
+ gen_server:call(MainPid, {open_ref_count, OpenedPid}).
is_idle(MainPid) ->
gen_server:call(MainPid, is_idle).