couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rand...@apache.org
Subject [2/3] git commit: clear ETS table entry if view group fails to start
Date Mon, 19 Mar 2012 04:40:48 GMT
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 <randall@apache.org>
Authored: Sun Mar 18 20:49:19 2012 -0700
Committer: Randall Leeds <randall@apache.org>
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) ->


Mime
View raw message