jiahuili430 commented on a change in pull request #3609:
URL: https://github.com/apache/couchdb/pull/3609#discussion_r654436421



##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -159,7 +167,7 @@ handle_request(MochiReq0) ->
 
 handle_request_int(MochiReq) ->
     Begin = os:timestamp(),
-    case config:get("chttpd", "socket_options") of
+    case config:get("chttpd", "socket_options", ?DEFAULT_SOCKET_OPTIONS) of

Review comment:
       Changed, Thanks for the review @iilyak 

##########
File path: src/chttpd/src/chttpd_prefer_header.erl
##########
@@ -22,6 +22,11 @@
 -include_lib("couch/include/couch_db.hrl").
 
 
+-define(DEFAULT_PREFER_MINIMAL,

Review comment:
       Thanks for the clarification, changed.

##########
File path: src/couch/src/couch_httpd.erl
##########
@@ -44,6 +44,10 @@
 -define(HANDLER_NAME_IN_MODULE_POS, 6).
 -define(MAX_DRAIN_BYTES, 1048576).
 -define(MAX_DRAIN_TIME_MSEC, 1000).
+-define(DEFAULT_SOCKET_OPTIONS, "[{sndbuf, 262144}]").
+-define(DEFAULT_AUTHENTICATION_HANDLERS,

Review comment:
       Changed.

##########
File path: src/couch/src/couch_server.erl
##########
@@ -823,7 +823,7 @@ get_default_engine(Server, DbName) ->
         engines = Engines
     } = Server,
     Default = {couch_bt_engine, make_filepath(RootDir, DbName, "couch")},
-    case config:get("couchdb", "default_engine") of
+    case config:get("couchdb", "default_engine", ?DEFAULT_ENGINE) of

Review comment:
       Changed.

##########
File path: src/chttpd/src/chttpd_sup.erl
##########
@@ -75,8 +77,9 @@ settings() ->
     [
         {bind_address, config:get("chttpd", "bind_address")},
         {port, config:get("chttpd", "port")},
-        {backlog, config:get("chttpd", "backlog")},
-        {server_options, config:get("chttpd", "server_options")}
+        {backlog, config:get("chttpd", "backlog", ?DEFAULT_BACKLOG)},

Review comment:
       Changed.

##########
File path: src/couch_replicator/src/couch_replicator_docs.erl
##########
@@ -456,26 +456,26 @@ maybe_add_trailing_slash(Url) ->
 make_options(Props) ->
     Options0 = lists:ukeysort(1, convert_options(Props)),
     Options = check_options(Options0),
-    DefWorkers = config:get("replicator", "worker_processes", "4"),
-    DefBatchSize = config:get("replicator", "worker_batch_size", "500"),
-    DefConns = config:get("replicator", "http_connections", "20"),
-    DefTimeout = config:get("replicator", "connection_timeout", "30000"),
-    DefRetries = config:get("replicator", "retries_per_request", "5"),
+    DefWorkers = config:get_integer("replicator", "worker_processes", 4),
+    DefBatchSize = config:get_integer("replicator", "worker_batch_size", 500),
+    DefConns = config:get_integer("replicator", "http_connections", 20),
+    DefTimeout = config:get_integer("replicator", "connection_timeout", 30000),
+    DefRetries = config:get_integer("replicator", "retries_per_request", 5),
     UseCheckpoints = config:get("replicator", "use_checkpoints", "true"),

Review comment:
       Changed.

##########
File path: src/ioq/src/ioq.erl
##########
@@ -55,7 +55,15 @@ get_queue_lengths() ->
     gen_server:call(?MODULE, get_queue_lengths).
 
 bypass(Priority) ->
-    config:get("ioq.bypass", atom_to_list(Priority)) =:= "true".
+    case Priority of

Review comment:
       Thanks

##########
File path: src/chttpd/src/chttpd_db.erl
##########
@@ -1714,7 +1714,7 @@ parse_doc_query(Req) ->
 parse_shards_opt(Req) ->
     [
         {n, parse_shards_opt("n", Req, config:get("cluster", "n", "3"))},
-        {q, parse_shards_opt("q", Req, config:get("cluster", "q", "8"))},
+        {q, parse_shards_opt("q", Req, config:get("cluster", "q", "2"))},

Review comment:
       Changed.

##########
File path: src/mem3/src/mem3.erl
##########
@@ -204,7 +204,7 @@ choose_shards(DbName, Nodes, Options) ->
        true -> ok
     end,
     Q = mem3_util:q_val(couch_util:get_value(q, Options,
-        config:get("cluster", "q", "8"))),
+        config:get("cluster", "q", "2"))),

Review comment:
       Changed.

##########
File path: src/setup/src/setup_httpd.erl
##########
@@ -36,7 +36,7 @@ handle_setup_req(#httpd{method='GET'}=Req) ->
         true ->
             chttpd:send_json(Req, 200, {[{state, single_node_enabled}]});
         _ ->
-            case config:get("cluster", "n", undefined) of
+            case config:get("cluster", "n", "3") of

Review comment:
       Changed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to