@@ -30,10 +30,13 @@ Definition
30
30
Syntax
31
31
------
32
32
33
- .. versionchanged:: 4.2
33
+ .. versionchanged:: 4.4
34
34
35
- MongoDB removes the deprecated ``maxScan`` option to the
36
- :dbcommand:`find` command. Use the ``maxTimeMS`` option instead.
35
+ MongoDB deprecates the ``oplogReplay`` option to the :dbcommand:`find`
36
+ command. The optimization enabled by this flag in previous versions now
37
+ happens automatically for eligible queries on the oplog. Therefore,
38
+ you don't need to specify this flag. If specified, the server accepts
39
+ the flag for backwards compatibility, but the flag has no effect.
37
40
38
41
The :dbcommand:`find` command has the following syntax:
39
42
@@ -67,6 +70,8 @@ The :dbcommand:`find` command has the following syntax:
67
70
}
68
71
)
69
72
73
+ .. _find-cmd-fields:
74
+
70
75
Command Fields
71
76
~~~~~~~~~~~~~~
72
77
@@ -284,13 +289,14 @@ The command accepts the following fields:
284
289
285
290
- boolean
286
291
287
- - Optional. An internal command for replaying a :ref:`replica set's oplog
292
+ - .. deprecated:: 4.4
293
+
294
+ Optional. An internal command for replaying a :ref:`replica set's oplog
288
295
<replica-set-oplog>`.
289
296
290
- To use ``oplogReplay``, the ``find`` field must refer to a
291
- :doc:`capped collection </core/capped-collections>` and you must
292
- provide a ``filter`` option comparing the ``ts`` document field to a
293
- :data:`timestamp` using one of the following comparison operators:
297
+ To use ``oplogReplay``, the ``find`` field must provide a ``filter``
298
+ option comparing the ``ts`` document field to a :data:`timestamp` using
299
+ one of the following comparison operators:
294
300
295
301
* :expression:`$gte`
296
302
* :expression:`$gt`
@@ -306,11 +312,18 @@ The command accepts the following fields:
306
312
oplogReplay: true,
307
313
filter: { ts: { $gte: new Timestamp(1514764800, 0) } } }
308
314
309
- .. versionchanged:: 3.6
310
-
311
- :expression:`$eq` is now supported.
312
-
313
-
315
+ .. admonition:: Deprecated
316
+ :class: note
317
+
318
+ .. versionchanged:: 4.4
319
+
320
+ Starting in MongoDB 4.4, the ``oplogReplay`` field is deprecated.
321
+ ``find`` fields that use the :expression:`$gte`, :expression:`$gt`,
322
+ or :expression:`$eq` ``filter`` predicated on the ``ts`` field
323
+ will automatically utilize the storage format of the :ref:`replica
324
+ set's oplog <replica-set-oplog>` to execute the command more
325
+ efficiently. If specified, the server accepts the ``oplogReplay``
326
+ flag for backwards compatibility, but the flag has no effect.
314
327
315
328
* - ``noCursorTimeout``
316
329
0 commit comments