From 4bad6bce6e68d63d18324aef79696d19da412b2b Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Wed, 9 Jul 2025 13:34:08 -0400 Subject: [PATCH 1/4] chore(NODE-6589): update maxIdelTimeMS API docs --- src/mongo_client.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 5cbf8ec66e..59ea106723 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -184,7 +184,11 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC minPoolSize?: number; /** The maximum number of connections that may be in the process of being established concurrently by the connection pool. */ maxConnecting?: number; - /** The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed. */ + /** + * The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed. + * Note that idle connections in the pool can be cleaned up even whe minPoolSize is set to 0. For errors that happen + * that include the InterruptInUseConnections label, all non idle connections will be closed as well. + */ maxIdleTimeMS?: number; /** The maximum time in milliseconds that a thread can wait for a connection to become available. */ waitQueueTimeoutMS?: number; From bb3ae467edf90ee0a07187f044c242567c3e4350 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Wed, 9 Jul 2025 18:04:24 -0400 Subject: [PATCH 2/4] Update src/mongo_client.ts Co-authored-by: Daria Pardue --- src/mongo_client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 59ea106723..f45db4492f 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -186,7 +186,7 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC maxConnecting?: number; /** * The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed. - * Note that idle connections in the pool can be cleaned up even whe minPoolSize is set to 0. For errors that happen + * Note that idle connections in the pool can be cleaned up even when minPoolSize is set to 0. For errors that happen * that include the InterruptInUseConnections label, all non idle connections will be closed as well. */ maxIdleTimeMS?: number; From d5e6a102938017ccec69f248a66c93fd31b2cfcc Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 10 Jul 2025 10:26:29 -0400 Subject: [PATCH 3/4] chore: comments --- src/mongo_client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mongo_client.ts b/src/mongo_client.ts index f45db4492f..588b995f02 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -185,9 +185,9 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC /** The maximum number of connections that may be in the process of being established concurrently by the connection pool. */ maxConnecting?: number; /** - * The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed. - * Note that idle connections in the pool can be cleaned up even when minPoolSize is set to 0. For errors that happen - * that include the InterruptInUseConnections label, all non idle connections will be closed as well. + * The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. + * If specified, this must be a number >= 0, where 0 means there is no limit. Defaults to 0. After this time passes, the idle + * collection can be automatically cleaned up in the background. */ maxIdleTimeMS?: number; /** The maximum time in milliseconds that a thread can wait for a connection to become available. */ From 406bb0db86c9d51bf493c5d8b2cd88eb18f857fe Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 10 Jul 2025 10:54:21 -0400 Subject: [PATCH 4/4] chore: fix lint --- src/mongo_client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 588b995f02..77b6559049 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -186,8 +186,8 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC maxConnecting?: number; /** * The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. - * If specified, this must be a number >= 0, where 0 means there is no limit. Defaults to 0. After this time passes, the idle - * collection can be automatically cleaned up in the background. + * If specified, this must be a number greater than or equal to 0, where 0 means there is no limit. Defaults to 0. After this + * time passes, the idle collection can be automatically cleaned up in the background. */ maxIdleTimeMS?: number; /** The maximum time in milliseconds that a thread can wait for a connection to become available. */