diff options
author | Adam Kocoloski <adam@cloudant.com> | 2011-02-24 14:52:28 -0500 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2011-02-24 14:52:28 -0500 |
commit | 3fddaf325d5b46fb35896282a0a6bf03bd34c88d (patch) | |
tree | 56d79a82f5fa6d3a8e251031aa219fdbe48eb868 | |
parent | 2a969e21732f9a53f60ce478af1537bf7f19588e (diff) |
Improve the way we generate the match spec for a #db{}
-rw-r--r-- | apps/couch/src/couch_server.erl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/couch/src/couch_server.erl b/apps/couch/src/couch_server.erl index 4441fd16..bfbe9c09 100644 --- a/apps/couch/src/couch_server.erl +++ b/apps/couch/src/couch_server.erl @@ -353,9 +353,7 @@ code_change(_OldVsn, State, _Extra) -> handle_info({'EXIT', _Pid, config_change}, Server) -> {stop, config_change, Server}; handle_info({'EXIT', Pid, Reason}, #server{dbs_open=DbsOpen}=Server) -> - Match = erlang:make_tuple(tuple_size(#db{}), '_', [{1, db}, - {#db.main_pid, Pid}]), - case ets:match_object(couch_dbs, Match) of + case ets:match_object(couch_dbs, #db{main_pid=Pid, _='_'}) of [#db{name = DbName, compactor_pid=Froms}] -> ?LOG_INFO("db ~s died with reason ~p", [DbName, Reason]), % icky hack of field values - compactor_pid used to store clients |