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 36D6B9239 for ; Mon, 19 Mar 2012 04:40:51 +0000 (UTC) Received: (qmail 88149 invoked by uid 500); 19 Mar 2012 04:40:50 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 88001 invoked by uid 500); 19 Mar 2012 04:40:49 -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 87983 invoked by uid 99); 19 Mar 2012 04:40:49 -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 04:40:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0B4727B3A; Mon, 19 Mar 2012 04:40:48 +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: <20120319044049.0B4727B3A@tyr.zones.apache.org> Date: Mon, 19 Mar 2012 04:40:48 +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/a38f59d1 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a38f59d1 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a38f59d1 Branch: refs/heads/1.2.x Commit: a38f59d1752ec611f0edc26e8f641a36b52f0c67 Parents: 04c4a10 Author: Randall Leeds Authored: Sun Mar 18 20:49:19 2012 -0700 Committer: Randall Leeds Committed: Sun Mar 18 21:36:48 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/a38f59d1/src/couchdb/couch_view.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_view.erl b/src/couchdb/couch_view.erl index 29026ed..f12524d 100644 --- a/src/couchdb/couch_view.erl +++ b/src/couchdb/couch_view.erl @@ -384,7 +384,9 @@ handle_info({'DOWN', _, _, _, {DbName, DDocId, Sig, Reply}}, Server) -> case Reply of {ok, NewPid} -> link(NewPid), add_to_ets(NewPid, DbName, DDocId, Sig); - _ -> ok end, + _ -> + ets:delete(group_servers_by_sig, {DbName, Sig}) + end, {noreply, Server}. add_to_ets(Pid, DbName, DDocId, Sig) ->