Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mongodb): hide topology.pool_size and fix it at 1 #11163

Merged
merged 1 commit into from Jun 30, 2023

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Jun 29, 2023

Fixes https://emqx.atlassian.net/browse/EMQX-10408

From an old conversation with @kjellwinblad:

There are 3 pool_sizes

  • The buffer workers pool size, just exposed here: feat(mongo): expose buffer worker opts to the bridge frontend (5.0)聽#9742
  • The topology.pool_size, which controls the pool size for the poolboy_pool in Kjell's
    diagram (on mongodb's side).
  • The pool_size from emqx_connector_mongo:mongo_fields that controls the ecpool pool
    size (on EMQX's side).
    So we actually want to set topology.pool_size = 1 and hide it from users.

Summary

馃 Generated by Copilot at 40aecf4

Hide pool_size option and set it to 1 for MongoDB plugin. This avoids confusion and improves compatibility with the MongoDB driver.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • [na] Added tests for the changes
  • [na] Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • [na] If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • [na] If changed package build workflow, pass this action (manual trigger)
  • [na] Change log has been added to changes/ dir for user-facing artifacts update

@thalesmg thalesmg force-pushed the fix-rm-mongo-topology-pool-size branch 2 times, most recently from d26571f to ea4ab00 Compare June 29, 2023 18:56
thalesmg added a commit to thalesmg/emqx-dashboard5 that referenced this pull request Jun 29, 2023
@thalesmg
Copy link
Contributor Author

Will require changes in the frontend. Attempt PR: emqx/emqx-dashboard5#1568

@thalesmg thalesmg force-pushed the fix-rm-mongo-topology-pool-size branch from ea4ab00 to fec1233 Compare June 29, 2023 19:16
@coveralls
Copy link
Collaborator

coveralls commented Jun 29, 2023

Pull Request Test Coverage Report for Build 5423344081

  • 4 of 7 (57.14%) changed or added relevant lines in 1 file are covered.
  • 29 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.001%) to 81.937%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/emqx_mongodb/src/emqx_mongodb.erl 4 7 57.14%
Files with Coverage Reduction New Missed Lines %
apps/emqx_gateway_mqttsn/src/emqx_mqttsn_frame.erl 1 64.04%
apps/emqx/src/emqx_channel.erl 1 87.41%
apps/emqx/src/emqx_schema.erl 1 87.5%
apps/emqx/src/emqx_session.erl 1 87.65%
apps/emqx/src/emqx_ws_connection.erl 1 76.37%
apps/emqx_resource/src/emqx_resource_buffer_worker.erl 3 93.32%
apps/emqx_oracle/src/emqx_oracle.erl 4 80.0%
apps/emqx/src/emqx_reason_codes.erl 17 83.82%
Totals Coverage Status
Change from base Build 5421999361: 0.001%
Covered Lines: 30682
Relevant Lines: 37446

馃挍 - Coveralls

Fixes https://emqx.atlassian.net/browse/EMQX-10408

From an old conversation with @kjellwinblad:

> There are 3 pool_sizes
> - The buffer workers pool size, just exposed here: emqx#9742
> - The topology.pool_size, which controls the pool size for the poolboy_pool in Kjell's
  diagram (on mongodb's side).
> - The pool_size from emqx_connector_mongo:mongo_fields that controls the ecpool pool
  size (on EMQX's side).
> So we actually want to set topology.pool_size = 1 and hide it from users.
@thalesmg thalesmg force-pushed the fix-rm-mongo-topology-pool-size branch from fec1233 to 3c8f591 Compare June 30, 2023 13:17
@thalesmg thalesmg marked this pull request as ready for review June 30, 2023 15:46
@thalesmg thalesmg requested a review from a team as a code owner June 30, 2023 15:46
@thalesmg thalesmg merged commit 7cf1dd7 into emqx:master Jun 30, 2023
140 checks passed
@thalesmg thalesmg deleted the fix-rm-mongo-topology-pool-size branch June 30, 2023 16:13
Kinplemelon pushed a commit to emqx/emqx-dashboard5 that referenced this pull request Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants