From c84a4b2b6bac5e5505ba22b6a324318ecfd67ba0 Mon Sep 17 00:00:00 2001 From: EMQ-YangM Date: Sat, 2 Apr 2022 10:26:55 +0800 Subject: [PATCH 1/2] fix: update mongodb driver to fix potential process leak --- CHANGES-4.3.md | 1 + apps/emqx_auth_mongo/rebar.config | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES-4.3.md b/CHANGES-4.3.md index 99ff74d8f..b9b780dfa 100644 --- a/CHANGES-4.3.md +++ b/CHANGES-4.3.md @@ -23,6 +23,7 @@ File format: * Prohibit empty topics in strict mode * Make sure ehttpc delete useless pool always succeed. +* Update mongodb driver to fix potential process leak. ## v4.3.13 diff --git a/apps/emqx_auth_mongo/rebar.config b/apps/emqx_auth_mongo/rebar.config index c89c15d3c..4283b7920 100644 --- a/apps/emqx_auth_mongo/rebar.config +++ b/apps/emqx_auth_mongo/rebar.config @@ -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.12"}}}, + [{mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.13"}}}, %% 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). @@ -29,4 +29,3 @@ {cover_enabled, true}. {cover_opts, [verbose]}. {cover_export_enabled, true}. - From 9d25c58bb127b8f4032e797d881e4685bac2556c Mon Sep 17 00:00:00 2001 From: EMQ-YangM Date: Sat, 2 Apr 2022 16:54:48 +0800 Subject: [PATCH 2/2] fix: move mongodb-erlang to top level rebar.config --- apps/emqx_auth_mongo/rebar.config | 3 +-- rebar.config | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx_auth_mongo/rebar.config b/apps/emqx_auth_mongo/rebar.config index 4283b7920..8db0176b0 100644 --- a/apps/emqx_auth_mongo/rebar.config +++ b/apps/emqx_auth_mongo/rebar.config @@ -1,7 +1,6 @@ {deps, %% NOTE: mind poolboy version when updating mongodb-erlang version - [{mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.13"}}}, - %% mongodb-erlang uses a special fork https://github.com/comtihon/poolboy.git + [%% 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). %% By accident, We have always been using the upstream fork due to diff --git a/rebar.config b/rebar.config index 26052e80b..484969060 100644 --- a/rebar.config +++ b/rebar.config @@ -57,6 +57,7 @@ , {getopt, "1.0.1"} , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.15.0"}}} , {lc, {git, "https://github.com/emqx/lc.git", {tag, "0.2.0"}}} + , {mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.13"}}} ]}. {xref_ignores,