From 5d66a90d815f474319d0ce8e7b884bc6e043431c Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 12 Sep 2024 13:15:46 -0600 Subject: [PATCH] Matt's comments --- .../client-side-operations-timeout.md | 9 +++++---- source/crud/crud.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/client-side-operations-timeout/client-side-operations-timeout.md b/source/client-side-operations-timeout/client-side-operations-timeout.md index b9ee58c4e4..e4233e8e69 100644 --- a/source/client-side-operations-timeout/client-side-operations-timeout.md +++ b/source/client-side-operations-timeout/client-side-operations-timeout.md @@ -433,12 +433,13 @@ See [runCommand behavior](#runcommand-behavior). > [!NOTE] > This portion of the specification is only relevant for drivers that provide `explain` helpers. -When `timeoutMS` is specified, drivers MUST take care to ensure that timeoutMS is correctly applied to the top-level -explain command. Care should be taken by drivers with a fluent API - the following example should apply a timeoutMS of -1000 to the `explain` command: +When `timeoutMS` is specified, drivers MUST provide a way to specify timeoutMS that results in maxTimeMS being set on +the `explain` command. For example, Node's implementation might look like: ```typescript -collection.find({}, { timeoutMS: 1000 }).explain(); +collection.find({}).explain({ timeoutMS: 1000 }); +// sends: +{ explain: { find: ... }, maxTimeMS: } ``` ## Test Plan diff --git a/source/crud/crud.md b/source/crud/crud.md index 98f9cadb7d..70ed965fcd 100644 --- a/source/crud/crud.md +++ b/source/crud/crud.md @@ -2234,7 +2234,7 @@ collection.find({ name: 'john doe' }).explain({ timeoutMS: 1000 }); // sends: { explain: { find: , query: { name: 'john doe' } }, - maxTimeMS: <1000 - average rtt> + maxTimeMS: <1000 - min rtt> } ```