Compare commits
8 Commits
master
...
release-56
Author | SHA1 | Date |
---|---|---|
![]() |
a105d0c13e | |
![]() |
ba56ab9de6 | |
![]() |
1863731ecb | |
![]() |
b6d7d8b5cd | |
![]() |
9ede0d7916 | |
![]() |
a13c961744 | |
![]() |
a2a598469e | |
![]() |
986e7dc1a6 |
|
@ -35,4 +35,4 @@
|
|||
-define(EMQX_RELEASE_CE, "5.6.1").
|
||||
|
||||
%% Enterprise edition
|
||||
-define(EMQX_RELEASE_EE, "5.6.1").
|
||||
-define(EMQX_RELEASE_EE, "5.6.1-patch.2").
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{application, emqx, [
|
||||
{id, "emqx"},
|
||||
{description, "EMQX Core"},
|
||||
{vsn, "5.2.1"},
|
||||
{vsn, "5.2.2"},
|
||||
{modules, []},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_auth_jwt, [
|
||||
{description, "EMQX JWT Authentication and Authorization"},
|
||||
{vsn, "0.2.0"},
|
||||
{vsn, "0.2.1"},
|
||||
{registered, []},
|
||||
{mod, {emqx_auth_jwt_app, []}},
|
||||
{applications, [
|
||||
|
|
|
@ -159,7 +159,10 @@ refresh_jwks(
|
|||
case
|
||||
httpc:request(
|
||||
get,
|
||||
{Endpoint, [{"Accept", "application/json"}]},
|
||||
{Endpoint, [
|
||||
{"Accept", "application/json"},
|
||||
{"User-Agent", "EMQX/" ++ emqx_release:version_with_prefix()}
|
||||
]},
|
||||
HTTPOpts,
|
||||
[{body_format, binary}, {sync, false}, {receiver, self()}]
|
||||
)
|
||||
|
|
|
@ -255,6 +255,8 @@ deliver([], Context, Pid, Topic, Cursor, Limiter) ->
|
|||
deliver(Result, Context, Pid, Topic, Cursor, Limiter) ->
|
||||
case erlang:is_process_alive(Pid) of
|
||||
false ->
|
||||
ok = close_cursor(Cursor),
|
||||
?tp(debug, retainer_dispatcher_no_receiver, #{topic => Topic}),
|
||||
{ok, Limiter};
|
||||
_ ->
|
||||
DeliverNum = emqx_conf:get([retainer, flow_control, batch_deliver_number], undefined),
|
||||
|
@ -272,6 +274,11 @@ deliver(Result, Context, Pid, Topic, Cursor, Limiter) ->
|
|||
end
|
||||
end.
|
||||
|
||||
close_cursor({{qlc_cursor, _} = Cursor, _}) ->
|
||||
qlc:delete_cursor(Cursor);
|
||||
close_cursor(_Cursor) ->
|
||||
ok.
|
||||
|
||||
do_deliver([], _DeliverNum, _Pid, _Topic, Limiter) ->
|
||||
{ok, Limiter};
|
||||
do_deliver(Msgs, DeliverNum, Pid, Topic, Limiter) ->
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
-include("emqx_retainer.hrl").
|
||||
|
||||
-include_lib("emqx/include/asserts.hrl").
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-include_lib("common_test/include/ct.hrl").
|
||||
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
||||
|
@ -461,6 +462,66 @@ t_flow_control(_) ->
|
|||
}),
|
||||
ok.
|
||||
|
||||
t_cursor_cleanup(_) ->
|
||||
Rate = emqx_ratelimiter_SUITE:to_rate("1/1s"),
|
||||
LimiterCfg = make_limiter_cfg(Rate),
|
||||
JsonCfg = make_limiter_json(<<"1/1s">>),
|
||||
emqx_limiter_server:add_bucket(emqx_retainer, internal, LimiterCfg),
|
||||
emqx_retainer:update_config(#{
|
||||
<<"delivery_rate">> => <<"1/1s">>,
|
||||
<<"flow_control">> =>
|
||||
#{
|
||||
<<"batch_read_number">> => 1,
|
||||
<<"batch_deliver_number">> => 1,
|
||||
<<"batch_deliver_limiter">> => JsonCfg
|
||||
}
|
||||
}),
|
||||
{ok, C1} = emqtt:start_link([{clean_start, true}, {proto_ver, v5}]),
|
||||
{ok, _} = emqtt:connect(C1),
|
||||
lists:foreach(
|
||||
fun(I) ->
|
||||
emqtt:publish(
|
||||
C1,
|
||||
<<"retained/", (integer_to_binary(I))/binary>>,
|
||||
<<"this is a retained message">>,
|
||||
[{qos, 0}, {retain, true}]
|
||||
)
|
||||
end,
|
||||
lists:seq(1, 5)
|
||||
),
|
||||
{ok, #{}, [0]} = emqtt:subscribe(C1, <<"retained/#">>, [{qos, 0}, {rh, 0}]),
|
||||
|
||||
snabbkaffe:start_trace(),
|
||||
|
||||
?assertWaitEvent(
|
||||
emqtt:disconnect(C1),
|
||||
#{?snk_kind := retainer_dispatcher_no_receiver, topic := <<"retained/#">>},
|
||||
2000
|
||||
),
|
||||
|
||||
QLCProcesses = lists:filter(
|
||||
fun(Pid) ->
|
||||
{current_function, {qlc, wait_for_request, 3}} =:=
|
||||
erlang:process_info(Pid, current_function)
|
||||
end,
|
||||
erlang:processes()
|
||||
),
|
||||
|
||||
?assertEqual(0, length(QLCProcesses)),
|
||||
|
||||
snabbkaffe:stop(),
|
||||
|
||||
emqx_limiter_server:del_bucket(emqx_retainer, internal),
|
||||
emqx_retainer:update_config(#{
|
||||
<<"flow_control">> =>
|
||||
#{
|
||||
<<"batch_read_number">> => 1,
|
||||
<<"batch_deliver_number">> => 1
|
||||
}
|
||||
}),
|
||||
|
||||
ok.
|
||||
|
||||
t_clear_expired(_) ->
|
||||
ConfMod = fun(Conf) ->
|
||||
Conf#{
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# e5.6.1-patch.1
|
||||
|
||||
Fix retainer QLC process leak. See PR #13206
|
||||
|
||||
# e5.6.1-patch.2
|
||||
|
||||
Add User-Agent header to jwks HTTP request. See PR #13208
|
|
@ -14,8 +14,8 @@ type: application
|
|||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 5.6.1
|
||||
version: 5.6.1-patch.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: 5.6.1
|
||||
appVersion: 5.6.1-patch.2
|
||||
|
|
3
mix.exs
3
mix.exs
|
@ -100,7 +100,8 @@ defmodule EMQXUmbrella.MixProject do
|
|||
{:rfc3339, github: "emqx/rfc3339", tag: "0.2.3", override: true},
|
||||
{:bcrypt, github: "emqx/erlang-bcrypt", tag: "0.6.2", override: true},
|
||||
{:uuid, github: "okeuday/uuid", tag: "v2.0.6", override: true},
|
||||
{:quickrand, github: "okeuday/quickrand", tag: "v2.0.6", override: true}
|
||||
{:quickrand, github: "okeuday/quickrand", tag: "v2.0.6", override: true},
|
||||
{:mimerl, "1.2.0", override: true}
|
||||
] ++
|
||||
emqx_apps(profile_info, version) ++
|
||||
enterprise_deps(profile_info) ++ jq_dep() ++ quicer_dep()
|
||||
|
|
Loading…
Reference in New Issue