perf(pool): change emqx_retainer_pool type to hash

This commit is contained in:
William Yang 2021-10-27 08:26:02 +02:00
parent 4dbe3ccf71
commit edc1581b4b
2 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ cast(Msg) ->
%% @private
worker() ->
gproc_pool:pick_worker(?POOL).
gproc_pool:pick_worker(?POOL, self()).
run({M, F, A}) ->
erlang:apply(M, F, A);

View File

@ -26,7 +26,7 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
PoolSpec = emqx_pool_sup:spec([emqx_retainer_pool, random, emqx_vm:schedulers(),
PoolSpec = emqx_pool_sup:spec([emqx_retainer_pool, hash, emqx_vm:schedulers(),
{emqx_retainer_pool, start_link, []}]),
{ok, {{one_for_one, 10, 3600},
[#{id => retainer,