Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6AB14918F for ; Mon, 19 Mar 2012 08:25:03 +0000 (UTC) Received: (qmail 12360 invoked by uid 500); 19 Mar 2012 08:24:53 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 11326 invoked by uid 500); 19 Mar 2012 08:24:15 -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 11173 invoked by uid 99); 19 Mar 2012 08:24:09 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2012 08:24:09 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 380EC7BA4; Mon, 19 Mar 2012 08:24:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: randall@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: clear ETS table entry if view group fails to start Message-Id: <20120319082409.380EC7BA4@tyr.zones.apache.org> Date: Mon, 19 Mar 2012 08:24:09 +0000 (UTC) clear ETS table entry if view group fails to start Without this, the next process which tries to open the view group will add itself to the wait list even though the monitor has already fired. When that happens, the caller hangs forever. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d38ded52 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d38ded52 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d38ded52 Branch: refs/heads/1.1.x Commit: d38ded520257f0db15b05f3f23f84fb0784d1adb Parents: 311d069 Author: Randall Leeds Authored: Sun Mar 18 20:49:19 2012 -0700 Committer: Randall Leeds Committed: Mon Mar 19 01:23:37 2012 -0700 ---------------------------------------------------------------------- src/couchdb/couch_view.erl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/d38ded52/src/couchdb/couch_view.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_view.erl b/src/couchdb/couch_view.erl index b780bc0..3afe3b4 100644 --- a/src/couchdb/couch_view.erl +++ b/src/couchdb/couch_view.erl @@ -369,7 +369,9 @@ handle_info({'DOWN', _, _, _, {DbName, Sig, Reply}}, Server) -> case Reply of {ok, NewPid} -> link(NewPid), add_to_ets(NewPid, DbName, Sig); - _ -> ok end, + _ -> + ets:delete(group_servers_by_sig, {DbName, Sig}) + end, {noreply, Server}. add_to_ets(Pid, DbName, Sig) ->