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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-3750): make maxConnecting configurable #3261

Merged
merged 5 commits into from May 25, 2022

Conversation

dariakp
Copy link
Contributor

@dariakp dariakp commented May 23, 2022

Description

NODE-3750, changes implement the following spec commit: ce242d

What is changing?

  • Added maxConnecting as a pool option that is externally configurable as a client option
    • per the spec, maxConnecting <= 0 should warn, so, in line with our warning = error convention, maxConnecting <=0 will error (note that there are two different errors: one from uint validation, and one to handle 0 specifically)
  • Synced new cmap test: pool-checkout-custom-maxConnecting-is-enforced
  • Updated uri options connection-pool-options test file with new tests and implemented maxConnection option parsing in the test runner
  • Updated existing node driver "all options" tests to include maxConnecting - there isn't any complicated option parsing happening, so it didn't seem to require an additional stand-alone test beyond what is covered by the URI spec tests themselves
Is there new documentation needed for these changes?

Yes, in addition to the API docs, we should also update the connection docs page for the node driver since it lists other pool options there.

What is the motivation for this change?

Spec

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • [N/A] New TODOs have a related JIRA ticket

durran
durran previously requested changes May 24, 2022
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we sync the yml test as well for uri options? (connection-pool-options.yml)

@dariakp
Copy link
Contributor Author

dariakp commented May 24, 2022

@durran good catch, I didn't even realize I missed them

@dariakp dariakp marked this pull request as ready for review May 24, 2022 15:29
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label May 24, 2022
@dariakp dariakp requested a review from durran May 24, 2022 19:26
@dariakp dariakp dismissed durran’s stale review May 24, 2022 20:08

Pulled in the test

src/connection_string.ts Outdated Show resolved Hide resolved
@dariakp dariakp requested a review from durran May 25, 2022 13:27
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels May 25, 2022
@durran durran merged commit ee41447 into main May 25, 2022
@durran durran deleted the NODE-3750/make-maxConnecting-configurable branch May 25, 2022 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
3 participants