Merge pull request #7187 from savonarola/mongo-no-double-pooling
chore(mongodb): do not use mongodb internal pool
This commit is contained in:
commit
4b19fb575a
|
@ -73,7 +73,7 @@ fields(sharded) ->
|
||||||
, {w_mode, fun w_mode/1}
|
, {w_mode, fun w_mode/1}
|
||||||
] ++ mongo_fields();
|
] ++ mongo_fields();
|
||||||
fields(topology) ->
|
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}
|
, {max_overflow, fun emqx_connector_schema_lib:pool_size/1}
|
||||||
, {overflow_ttl, fun duration/1}
|
, {overflow_ttl, fun duration/1}
|
||||||
, {overflow_check_period, fun duration/1}
|
, {overflow_check_period, fun duration/1}
|
||||||
|
@ -97,6 +97,11 @@ mongo_fields() ->
|
||||||
] ++
|
] ++
|
||||||
emqx_connector_schema_lib:ssl_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,
|
on_start(InstId, Config = #{mongo_type := Type,
|
||||||
|
|
Loading…
Reference in New Issue