@@ -67,11 +67,25 @@ The command accepts the following fields:
67
67
- non-negative integer
68
68
- Optional.
69
69
70
- The maximum amount of time MongoDB waits for new documents to be
71
- added to the cursor for the current ``getMore`` command. If you
72
- set ``maxTimeMS`` to 0, operations time out immediately. If
73
- unset, defaults to 1000 milliseconds.
70
+ Specifies the maximum time for the server to wait for new documents
71
+ that match a :ref:`tailable cursor <tailable-cursors-landing-page>`
72
+ query on a :ref:`capped collection <manual-capped-collection>`.
73
+ ``maxTimeMS`` on a ``getMore`` for a tailable ``awaitData`` cursor is
74
+ considered the same as :method:`~cursor.maxAwaitTimeMS()`.
75
+ Drivers will only set this value on ``getMore`` for a tailable
76
+ cursor on a capped collection with ``awaitData`` set to ``true``. Otherwise,
77
+ the command that creates the cursor sets ``maxTimeMS``, which
78
+ is the maximum amount of time that the initial operation, and
79
+ any subsequent ``getMore`` operations, can spend cumulatively executing
80
+ the query. For tailable cursors with ``awaitData`` set to ``true``,
81
+ the following is true:
74
82
83
+ - If no value is provided, the wait time defaults to ``1`` (1000 milliseconds).
84
+ - ``maxTimeMS`` on ``getMore`` specifies the maximum amount of time
85
+ MongoDB waits for new documents to be inserted into the capped
86
+ collection for that specific ``getMore`` command.
87
+ - ``maxTimeMS`` is set individually by the driver for each call to ``getMore``.
88
+
75
89
MongoDB terminates operations that exceed their allotted time limit
76
90
using the same mechanism as :method:`db.killOp()`. MongoDB only
77
91
terminates an operation at one of its designated :term:`interrupt points <interrupt point>`.
0 commit comments