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 08:24:09 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/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 <randall@apache.org>
Authored: Sun Mar 18 20:49:19 2012 -0700
Committer: Randall Leeds <randall@apache.org>
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) ->


Mime
View raw message