-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(NODE-6245): add keepAliveInitialDelay config #4510
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
base: main
Are you sure you want to change the base?
Conversation
}); | ||
}); | ||
|
||
context('when the value is negative', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AC on the ticket says:
allow it to be a pass-through (no validation)
do we need to revisit this requirement as a team?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any mongo client option has to be added to the connection string options, which is going to validate since the number is set as a uint. A negative number for this setting isn't valid anyways, so there's really no reason to set the type in the connection string module as something that can be invalid.
@@ -115,7 +115,11 @@ export type SupportedTLSSocketOptions = Pick< | |||
|
|||
/** @public */ | |||
export type SupportedSocketOptions = Pick< | |||
TcpNetConnectOpts & { autoSelectFamily?: boolean; autoSelectFamilyAttemptTimeout?: number }, | |||
TcpNetConnectOpts & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have AC to add API docs and mongo manual docs for the new option - is that something we want to revisit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the API docs. Mongo manual I flagged on the ticket with doc changes needed.
Capturing from our meeting: we want to get the keepAlive related options into the "options" argument we pass into KeepAlive will still always be enabled and not configurable. |
Description
Brings back the
keepAliveInitialDelay
option.What is changing?
keepAliveInitialDelay
as an option to pass to the socket.Is there new documentation needed for these changes?
Yes, driver docs.
What is the motivation for this change?
NODE-6245
Release Highlight
keepAliveInitialDelay
may now be configured at theMongoClient
levelWhen not present will default to 120 seconds. The option value must be specified in milliseconds.
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript