Merge pull request #8342 from lafirest/fix/pipeling

fix: change the type of enable_pipelining from bool to integer
This commit is contained in:
lafirest 2022-07-07 09:36:08 +08:00 committed by GitHub
commit aaaa65786a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 7 deletions

View File

@ -139,7 +139,7 @@ auth.http.pool_size = 32
## Whether to enable HTTP Pipelining
##
## See: https://en.wikipedia.org/wiki/HTTP_pipelining
auth.http.enable_pipelining = true
auth.http.enable_pipelining = 100
##------------------------------------------------------------------------------
## SSL options

View File

@ -110,10 +110,29 @@ end}.
]}.
{mapping, "auth.http.enable_pipelining", "emqx_auth_http.enable_pipelining", [
{default, true},
{datatype, {enum, [true, false]}}
{default, "100"},
{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", [
{datatype, string}
]}.

View File

@ -1,6 +1,6 @@
{application, emqx_auth_http,
[{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, []},
{registered, [emqx_auth_http_sup]},
{applications, [kernel,stdlib,ehttpc]},

View File

@ -1,6 +1,10 @@
%% -*- mode: erlang -*-
{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,brutal_purge,soft_purge,[]}]},
{"4.3.4",
@ -19,7 +23,11 @@
{<<"4.3.[0-1]">>,
[{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,brutal_purge,soft_purge,[]}]},
{"4.3.4",

View File

@ -1,6 +1,6 @@
{application, emqx_web_hook,
[{description, "EMQ X WebHook Plugin"},
{vsn, "4.3.12"}, % strict semver, bump manually!
{vsn, "4.3.13"}, % strict semver, bump manually!
{modules, []},
{registered, [emqx_web_hook_sup]},
{applications, [kernel,stdlib,ehttpc]},

View File

@ -26,6 +26,8 @@
{"4.3.11",
[{load_module,emqx_web_hook_actions,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]">>,
[{apply,{application,stop,[emqx_web_hook]}},
@ -52,4 +54,6 @@
{"4.3.11",
[{load_module,emqx_web_hook_actions,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,[]}]},
{<<".*">>,[]}]}.

View File

@ -67,6 +67,8 @@
description => #{en => <<"Connection Pool">>,
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,
type => boolean,
default => true,