couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 11/13: Add a log message for misconfigured default engine
Date Tue, 30 May 2017 18:43:18 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3287-pluggable-storage-engines
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0d8a45f19a8002e5760b171270bc4ce5d7910a06
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
AuthorDate: Tue May 30 11:40:35 2017 -0500

    Add a log message for misconfigured default engine
    
    If a user sets the default engine to something that's not a key in the
    couchdb_engines section of the config we'll now log a helpful error
    message alerting them to that fact.
---
 src/couch/src/couch_server.erl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 42f3442..986cc34 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -669,6 +669,11 @@ get_default_engine(Server, DbName) ->
                 {Extension, Module} ->
                     {Module, make_filepath(RootDir, DbName, Extension)};
                 false ->
+                    Fmt = "Invalid storage engine extension ~s,"
+                            " configured engine extensions are: ~s",
+                    Exts = [E || {E, _} <- Engines],
+                    Args = [Extension, string:join(Exts, ", ")],
+                    couch_log:error(Fmt, Args),
                     Default
             end;
         _ ->

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message