chore(mongodb): do not use mongodb internal pool

This commit is contained in:
Ilya Averyanov 2022-03-02 16:26:39 +03:00
parent 123b667eb0
commit a0cd877669
1 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,7 @@ fields(sharded) ->
, {w_mode, fun w_mode/1}
] ++ mongo_fields();
fields(topology) ->
[ {pool_size, fun emqx_connector_schema_lib:pool_size/1}
[ {pool_size, fun internal_pool_size/1}
, {max_overflow, fun emqx_connector_schema_lib:pool_size/1}
, {overflow_ttl, fun duration/1}
, {overflow_check_period, fun duration/1}
@ -97,6 +97,11 @@ mongo_fields() ->
] ++
emqx_connector_schema_lib:ssl_fields().
internal_pool_size(type) -> integer();
internal_pool_size(default) -> 1;
internal_pool_size(validator) -> [?MIN(1)];
internal_pool_size(_) -> undefined.
%% ===================================================================
on_start(InstId, Config = #{mongo_type := Type,