You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Specifies the time an operation will run until it throws a timeout error. See {@link AbstractCursorOptions.timeoutMode} for more details on how this option applies to cursors. */
147
146
timeoutMS?: number;
148
147
/**
148
+
* @public
149
+
* @experimental
149
150
* Specifies how `timeoutMS` is applied to the cursor. Can be either `'cursorLifeTime'` or `'iteration'`
150
151
* When set to `'iteration'`, the deadline specified by `timeoutMS` applies to each call of
151
152
* `cursor.next()`.
152
153
* When set to `'cursorLifetime'`, the deadline applies to the life of the entire cursor.
153
154
*
154
-
* Note that the use of '`cursorLifetime`' should be limited to relatively short-lived cursors as
155
-
* it has the potential to hang on an operation for the entirety of `timeoutMS`.
155
+
* Depending on the type of cursor being used, this option has different default values.
156
+
* For non-tailable cursors, this value defaults to `'cursorLifetime'`
157
+
* For tailable cursors, this value defaults to `'iteration'` since tailable cursors, by
158
+
* definition can have an arbitrarily long lifetime.
0 commit comments