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 03:56:39 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/c571a4b1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c571a4b1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c571a4b1

Branch: refs/heads/COUCHDB-1445
Commit: c571a4b1a047d29954cb4009adad85952351388c
Parents: 4837133
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 20:51:18 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/c571a4b1/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