couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [21/50] [abbrv] git commit: updated refs/heads/1684-feature-db-updates to ea07223
Date Mon, 22 Jul 2013 10:25:38 GMT
Fix badrecord error in EXIT handling

The second item in the by_pid tuple is the name not a #db{} record.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0bb6787c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0bb6787c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0bb6787c

Branch: refs/heads/1684-feature-db-updates
Commit: 0bb6787cec9c986feb1f6c16a280f2c0506dec0d
Parents: a27adbf
Author: Robert Newson <rnewson@apache.org>
Authored: Sat Jun 15 19:47:50 2013 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sat Jun 15 19:47:50 2013 +0100

----------------------------------------------------------------------
 src/couchdb/couch_server.erl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0bb6787c/src/couchdb/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl
index 8189761..4aceb55 100644
--- a/src/couchdb/couch_server.erl
+++ b/src/couchdb/couch_server.erl
@@ -428,8 +428,7 @@ handle_info({'EXIT', _Pid, config_change}, Server) ->
     {noreply, shutdown, Server};
 handle_info({'EXIT', Pid, Reason}, Server) ->
     Server2 = case ets:lookup(couch_dbs_by_pid, Pid) of
-    [{Pid, Db}] ->
-        DbName = Db#db.name,
+    [{Pid, DbName}] ->
 
         % If the Pid is known, the name should be as well.
         % If not, that's an error, which is why there is no [] clause.
@@ -440,7 +439,7 @@ handle_info({'EXIT', Pid, Reason}, Server) ->
                 io_lib:format(
                     "To open the database `~s`, Apache CouchDB "
                     "must be built with Erlang OTP R13B04 or higher.",
-                    [Db]
+                    [DbName]
                 );
             true ->
                 io_lib:format("Error opening database ~p: ~p", [DbName, Reason])
@@ -462,7 +461,7 @@ handle_info({'EXIT', Pid, Reason}, Server) ->
         true = ets:delete(couch_dbs_by_name, DbName),
 
         case ets:lookup(couch_sys_dbs, DbName) of
-        [{Db, _}] ->
+        [{DbName, _}] ->
             true = ets:delete(couch_sys_dbs, DbName),
             Server;
         [] ->


Mime
View raw message