Merge pull request #7249 from mononym/fix-mongodb-deadloop

fix: update mongodb client to include deadloop fix
This commit is contained in:
Chris Hicks 2022-03-09 11:49:23 +01:00 committed by GitHub
commit 2a4aa5a8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{deps,
%% NOTE: mind poolboy version when updating mongodb-erlang version
[{mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.10"}}},
[{mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.12"}}},
%% mongodb-erlang uses a special fork https://github.com/comtihon/poolboy.git
%% (which has overflow_ttl feature added).
%% However, it references `{branch, "master}` (commit 9c06a9a on 2021-04-07).

View File

@ -272,8 +272,9 @@ do_merge_update_actions(App, {New0, Changed0, Deleted0}, OldActions) ->
New = New0 -- AlreadyHandled,
Changed = Changed0 -- AlreadyHandled,
Deleted = Deleted0 -- AlreadyHandled,
HasRestart = contains_restart_application(App, OldActions),
Actions =
case contains_restart_application(App, OldActions) of
case HasRestart of
true ->
[];
false ->
@ -285,7 +286,12 @@ do_merge_update_actions(App, {New0, Changed0, Deleted0}, OldActions) ->
OldActionsWithStop ++
Actions ++
OldActionsAfterStop ++
[{delete_module, M} || M <- Deleted] ++
case HasRestart of
true ->
[];
false ->
[{delete_module, M} || M <- Deleted]
end ++
AppSpecific.
%% If an entry restarts an application, there's no need to use