diff options
author | Damien F. Katz <damien@apache.org> | 2008-12-18 21:43:34 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-12-18 21:43:34 +0000 |
commit | 2a6ad51f1acd4cae30a6e976d00444a1a6931702 (patch) | |
tree | 9f501a26ca689cf3b237a0cfe4966a768b008603 /src/couchdb/couch_server.erl | |
parent | 6cc0a3fcaddb3094f8f0fcd5bd51b3e74e70d11c (diff) |
fix for crash of couch_server when database non-existant
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@727832 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_server.erl')
-rw-r--r-- | src/couchdb/couch_server.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl index fd185bc8..2a2f51e2 100644 --- a/src/couchdb/couch_server.erl +++ b/src/couchdb/couch_server.erl @@ -309,8 +309,10 @@ code_change(_OldVsn, State, _Extra) -> handle_info({'EXIT', Pid, _Reason}, #server{current_dbs_open=DbsOpen}=Server) -> [{Pid, DbName}] = ets:lookup(couch_dbs_by_pid, Pid), + [{DbName, {Pid, LruTime}}] = ets:lookup(couch_dbs_by_name, DbName), true = ets:delete(couch_dbs_by_pid, Pid), true = ets:delete(couch_dbs_by_name, DbName), + true = ets:delete(couch_dbs_by_lru, LruTime), {noreply, Server#server{current_dbs_open=DbsOpen-1}}; handle_info(Info, _Server) -> exit({unknown_message, Info}). |