diff --git a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src b/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src index bf9a5e54c..9eb14fd7d 100644 --- a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src +++ b/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_mongo, [{description, "EMQ X Authentication/ACL with MongoDB"}, - {vsn, "4.3.1"}, % strict semver, bump manually! + {vsn, "4.3.2"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_mongo_sup]}, {applications, [kernel,stdlib,mongodb,ecpool]}, diff --git a/apps/emqx_auth_mongo/src/emqx_auth_mongo.appup.src b/apps/emqx_auth_mongo/src/emqx_auth_mongo.appup.src index 24e29d65c..449125709 100644 --- a/apps/emqx_auth_mongo/src/emqx_auth_mongo.appup.src +++ b/apps/emqx_auth_mongo/src/emqx_auth_mongo.appup.src @@ -1,11 +1,17 @@ %% -*- mode: erlang -*- {VSN, - [{"4.3.0", + [{"4.3.1", + [{load_module,emqx_auth_mongo,brutal_purge,soft_purge,[]}]}, + {"4.3.0", [{load_module,emqx_auth_mongo_app,brutal_purge,soft_purge,[]}, + {load_module,emqx_auth_mongo,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mongo,brutal_purge,soft_purge,[]}]}, {<<".*">>,[]}], - [{"4.3.0", + [{"4.3.1", + [{load_module,emqx_auth_mongo,brutal_purge,soft_purge,[]}]}, + {"4.3.0", [{load_module,emqx_auth_mongo_app,brutal_purge,soft_purge,[]}, + {load_module,emqx_auth_mongo,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mongo,brutal_purge,soft_purge,[]}]}, {<<".*">>,[]}] }. diff --git a/apps/emqx_auth_mongo/src/emqx_auth_mongo.erl b/apps/emqx_auth_mongo/src/emqx_auth_mongo.erl index cd1d21b42..307aa3f7f 100644 --- a/apps/emqx_auth_mongo/src/emqx_auth_mongo.erl +++ b/apps/emqx_auth_mongo/src/emqx_auth_mongo.erl @@ -129,6 +129,9 @@ query_multi(Pool, Collection, SelectorList) -> lists:reverse(lists:flatten(lists:foldl(fun(Selector, Acc1) -> Batch = ecpool:with_client(Pool, fun(Conn) -> case mongo_api:find(Conn, Collection, Selector, #{}) of + {error, Reason} -> + ?LOG(error, "[MongoDB] query_multi failed, got error: ~p", [Reason]), + []; [] -> []; {ok, Cursor} -> mc_cursor:foldl(fun(O, Acc2) -> [O|Acc2] end, [], Cursor, 1000)