Merge pull request #8342 from lafirest/fix/pipeling
fix: change the type of enable_pipelining from bool to integer
This commit is contained in:
commit
aaaa65786a
|
@ -139,7 +139,7 @@ auth.http.pool_size = 32
|
||||||
## Whether to enable HTTP Pipelining
|
## Whether to enable HTTP Pipelining
|
||||||
##
|
##
|
||||||
## See: https://en.wikipedia.org/wiki/HTTP_pipelining
|
## See: https://en.wikipedia.org/wiki/HTTP_pipelining
|
||||||
auth.http.enable_pipelining = true
|
auth.http.enable_pipelining = 100
|
||||||
|
|
||||||
##------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
## SSL options
|
## SSL options
|
||||||
|
|
|
@ -110,10 +110,29 @@ end}.
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "auth.http.enable_pipelining", "emqx_auth_http.enable_pipelining", [
|
{mapping, "auth.http.enable_pipelining", "emqx_auth_http.enable_pipelining", [
|
||||||
{default, true},
|
{default, "100"},
|
||||||
{datatype, {enum, [true, false]}}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
{translation, "emqx_auth_http.enable_pipelining", fun(Conf) ->
|
||||||
|
case cuttlefish:conf_get("auth.http.enable_pipelining", Conf, undefined) of
|
||||||
|
undefined -> 100;
|
||||||
|
Str ->
|
||||||
|
try
|
||||||
|
erlang:list_to_integer(Str)
|
||||||
|
catch _:_ ->
|
||||||
|
case erlang:list_to_atom(Str) of
|
||||||
|
true ->
|
||||||
|
100;
|
||||||
|
false ->
|
||||||
|
1;
|
||||||
|
_ ->
|
||||||
|
100
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end}.
|
||||||
|
|
||||||
{mapping, "auth.http.ssl.cacertfile", "emqx_auth_http.cacertfile", [
|
{mapping, "auth.http.ssl.cacertfile", "emqx_auth_http.cacertfile", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_auth_http,
|
{application, emqx_auth_http,
|
||||||
[{description, "EMQ X Authentication/ACL with HTTP API"},
|
[{description, "EMQ X Authentication/ACL with HTTP API"},
|
||||||
{vsn, "4.3.6"}, % strict semver, bump manually!
|
{vsn, "4.3.7"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_auth_http_sup]},
|
{registered, [emqx_auth_http_sup]},
|
||||||
{applications, [kernel,stdlib,ehttpc]},
|
{applications, [kernel,stdlib,ehttpc]},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{VSN,
|
{VSN,
|
||||||
[{"4.3.5",
|
[{"4.3.6",
|
||||||
|
[ %% There are only changes to the schema file, so we don't need any
|
||||||
|
%% commands here
|
||||||
|
]},
|
||||||
|
{"4.3.5",
|
||||||
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
|
||||||
{"4.3.4",
|
{"4.3.4",
|
||||||
|
@ -19,7 +23,11 @@
|
||||||
{<<"4.3.[0-1]">>,
|
{<<"4.3.[0-1]">>,
|
||||||
[{restart_application,emqx_auth_http}]},
|
[{restart_application,emqx_auth_http}]},
|
||||||
{<<".*">>,[]}],
|
{<<".*">>,[]}],
|
||||||
[{"4.3.5",
|
[{"4.3.6",
|
||||||
|
[ %% There are only changes to the schema file, so we don't need any
|
||||||
|
%% commands here
|
||||||
|
]},
|
||||||
|
{"4.3.5",
|
||||||
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
|
||||||
{"4.3.4",
|
{"4.3.4",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_web_hook,
|
{application, emqx_web_hook,
|
||||||
[{description, "EMQ X WebHook Plugin"},
|
[{description, "EMQ X WebHook Plugin"},
|
||||||
{vsn, "4.3.12"}, % strict semver, bump manually!
|
{vsn, "4.3.13"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_web_hook_sup]},
|
{registered, [emqx_web_hook_sup]},
|
||||||
{applications, [kernel,stdlib,ehttpc]},
|
{applications, [kernel,stdlib,ehttpc]},
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
{"4.3.11",
|
{"4.3.11",
|
||||||
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_web_hook,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_web_hook,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.12",
|
||||||
|
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]}]},
|
||||||
{<<".*">>,[]}],
|
{<<".*">>,[]}],
|
||||||
[{<<"4\\.3\\.[0-2]">>,
|
[{<<"4\\.3\\.[0-2]">>,
|
||||||
[{apply,{application,stop,[emqx_web_hook]}},
|
[{apply,{application,stop,[emqx_web_hook]}},
|
||||||
|
@ -52,4 +54,6 @@
|
||||||
{"4.3.11",
|
{"4.3.11",
|
||||||
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_web_hook,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_web_hook,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.12",
|
||||||
|
[{load_module,emqx_web_hook_actions,brutal_purge,soft_purge,[]}]},
|
||||||
{<<".*">>,[]}]}.
|
{<<".*">>,[]}]}.
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
description => #{en => <<"Connection Pool">>,
|
description => #{en => <<"Connection Pool">>,
|
||||||
zh => <<"连接池大小"/utf8>>}
|
zh => <<"连接池大小"/utf8>>}
|
||||||
},
|
},
|
||||||
|
%% NOTE: In the new version `enable_pipelining` is changed to integer type
|
||||||
|
%% but it needs to be compatible with the old version, so here keep it as boolean
|
||||||
enable_pipelining => #{order => 5,
|
enable_pipelining => #{order => 5,
|
||||||
type => boolean,
|
type => boolean,
|
||||||
default => true,
|
default => true,
|
||||||
|
|
Loading…
Reference in New Issue