From bf20191780079c81fc487c3e3dd52e51651adea5 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 1 Oct 2010 23:05:30 +0000 Subject: close db handles after using them to get view groups git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1003701 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_view.erl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/couchdb/couch_view.erl') diff --git a/src/couchdb/couch_view.erl b/src/couchdb/couch_view.erl index 35bc80b6..e3ec0ed8 100644 --- a/src/couchdb/couch_view.erl +++ b/src/couchdb/couch_view.erl @@ -29,9 +29,7 @@ start_link() -> gen_server:start_link({local, couch_view}, couch_view, [], []). get_temp_updater(DbName, Language, DesignOptions, MapSrc, RedSrc) -> - % make temp group - % do we need to close this db? - {ok, _Db, Group} = + {ok, Group} = couch_view_group:open_temp_group(DbName, Language, DesignOptions, MapSrc, RedSrc), case gen_server:call(couch_view, {get_group_server, DbName, Group}) of {ok, Pid} -> @@ -41,10 +39,8 @@ get_temp_updater(DbName, Language, DesignOptions, MapSrc, RedSrc) -> end. get_group_server(DbName, GroupId) -> - % get signature for group case couch_view_group:open_db_group(DbName, GroupId) of - % do we need to close this db? - {ok, _Db, Group} -> + {ok, Group} -> case gen_server:call(couch_view, {get_group_server, DbName, Group}) of {ok, Pid} -> Pid; -- cgit v1.2.3