Skip to content

Commit 39cf581

Browse files
committed
trivial: fix build warnings
1 parent 252f4c9 commit 39cf581

File tree

5 files changed

+50
-61
lines changed

5 files changed

+50
-61
lines changed

source/includes/extracts-command-field.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ content: |
2222
The ``comment`` field is present if a comment was passed to the operation.
2323
2424
The following example output contains the command object for a
25-
:doc:`find </reference/method/db.collection.find/#db.collection.find>`
25+
:dbcommand:`find`
2626
operation on a collection named ``items`` in a database
2727
named ``test``:
2828
@@ -37,7 +37,7 @@ content: |
3737
}
3838
3939
The following example output contains the command object for a
40-
:doc:`getMore </reference/command/getMore>` operation generated by
40+
:dbcommand:`getMore` operation generated by
4141
a command with cursor id ``80336119321`` on a collection named
4242
``items`` in a database named ``test``:
4343
@@ -62,4 +62,4 @@ source:
6262
ref: _command-field
6363
replacement:
6464
truncThreshold: "50 kilobytes"
65-
...
65+
...

source/reference/command/replSetResizeOplog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ The above command returns:
8686

8787
Reducing the size of the oplog in a node removes data from it. This
8888
may cause replica members syncing with that node to become stale.
89-
To resync those members, see :ref:`resync-replica-set-member`.
89+
To resync those members, see :doc:`/tutorial/resync-replica-set-member`.

source/reference/method/db.collection.find.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ because its ``qty`` value is of type ``object``.
129129

130130
.. note::
131131
To enforce data types in a collection, use
132-
:doc:`/core/document-validation`.
132+
:doc:`/core/schema-validation`.
133133

134134
Examples
135135
--------

source/release-notes/3.6.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Retryable Writes
321321
:dbcommand:`setFeatureCompatibilityVersion`.
322322

323323
Starting in MongoDB 3.6, :ref:`certain acknowledged write
324-
operations <retryable-ops>` on replica sets and sharded clusters are
324+
operations <retryable-write-ops>` on replica sets and sharded clusters are
325325
"retryable" to provide handling of transient network errors or replica
326326
set elections.
327327

source/tutorial/change-streams-example.txt

Lines changed: 44 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Change Stream Examples
1212

1313
.. important::
1414
Change streams are available for replica sets or sharded clusters with replica set
15-
shards. You cannot open a change stream against a standalone :program:`mongod`.
15+
shards. You cannot open a change stream against a standalone :program:`mongod`.
1616
For a sharded cluster, you must issue the open change stream operation against
1717
the :program:`mongos`.
1818

@@ -22,9 +22,6 @@ Change Stream Examples
2222

2323
- :ref:`WiredTiger <storage-wiredtiger>` storage engine (can be :ref:`encrypted <encrypted-storage-engine>`)
2424

25-
26-
27-
2825
.. contents:: On this page
2926
:local:
3027
:backlinks: none
@@ -36,57 +33,53 @@ Change Stream Examples
3633
tabs:
3734
- id: python
3835
content: |
39-
36+
4037
The examples below assume that you have `connected to a MongoDB replica set and have accessed a database
4138
<http://api.mongodb.com/python/current/tutorial.html?_ga=2.166792574.1325858930.1510605946-1663796716.1426889906#making-a-connection-with-mongoclient/>`_
4239
that contains an ``inventory`` collection.
4340

44-
4541
- id: java-sync
4642
content: |
4743
The examples below assume that you have `connected to a MongoDB replica set and have accessed a database
4844
<http://mongodb.github.io/mongo-java-driver/3.6/driver/tutorials/databases-collections/>`_
4945
that contains an ``inventory`` collection.
50-
46+
5147
- id: csharp
5248
content: |
5349
The examples below assume that you have `connected to a MongoDB replica set and have accessed a database
54-
<http://mongodb.github.io/mongo-csharp-driver/2.4/getting_started/quick_tour/#make-a-connection/>`_
50+
<http://mongodb.github.io/mongo-csharp-driver/2.4/getting_started/quick_tour/#make-a-connection/>`_
5551
that contains an ``inventory`` collection.
56-
52+
5753
- id: c
5854
content: |
5955
The examples below assume that you have `connected to a MongoDB replica set and have accessed a database
6056
<http://mongoc.org/libmongoc/current/tutorial.html#making-a-connection/>`_
6157
that contains an ``inventory`` collection.
62-
63-
6458

6559
Open A Change Stream
6660
--------------------
67-
61+
6862
This example opens a change stream against a replica set. The change stream is bound to a collection and
6963
change stream documents are iterated with a cursor. This cursor remains open until it is explicitly closed,
7064
as long as a connection to the MongoDB deployment remains open *and* the collection exists.
7165

72-
7366
.. tabs-drivers::
7467

7568
tabs:
7669
- id: python
7770
content: |
7871
.. class:: copyable-code
79-
72+
8073
.. literalinclude:: /driver-examples/test_examples.py
8174
:language: python
8275
:dedent: 8
83-
:start-after: Start Changestream Example 1
76+
:start-after: Start Changestream Example 1
8477
:end-before: End Changestream Example 1
8578

8679
- id: java-sync
8780
content: |
8881
.. class:: copyable-code
89-
82+
9083
.. literalinclude:: /driver-examples/DocumentationSamples.java
9184
:language: java
9285
:dedent: 8
@@ -101,11 +94,11 @@ as long as a connection to the MongoDB deployment remains open *and* the collect
10194
:dedent: 12
10295
:start-after: Start Changestream Example 1
10396
:end-before: End Changestream Example 1
104-
97+
10598
- id: c
10699
content: |
107100
.. class:: copyable-code
108-
101+
109102
.. literalinclude:: /driver-examples/test-mongoc-sample-commands.c
110103
:language: c
111104
:dedent: 0
@@ -129,44 +122,44 @@ Lookup Full Document for Update Operations
129122
tabs:
130123
- id: python
131124
content: |
132-
By default, change streams only return the delta of fields during the update operation.
125+
By default, change streams only return the delta of fields during the update operation.
133126
To return the most current majority-committed version of the updated
134127
document, pass ``full_document='updateLookup'`` to the
135-
:method:`db.collection.watch()` method.
136-
128+
:method:`db.collection.watch()` method.
129+
137130
- id: java-sync
138131
content: |
139-
By default, change streams only return the delta of fields during the update operation.
132+
By default, change streams only return the delta of fields during the update operation.
140133
To return the most current majority-committed version of the updated
141134
document, pass ``FullDocument.UPDATE_LOOKUP`` to the
142-
:method:`db.collection.watch.fullDocument()` method.
143-
135+
:method:`db.collection.watch.fullDocument()` method.
136+
144137
- id: c
145138
content: |
146-
By default, change streams only return the delta of fields during the update operation.
139+
By default, change streams only return the delta of fields during the update operation.
147140
To return the most current majority-committed version of the updated
148141
document, pass the ``"fullDocument"`` option with the ``"updateLookup"`` value to the
149-
:method:`mongoc_collection_watch` method.
150-
142+
:method:`mongoc_collection_watch` method.
143+
151144
- id: csharp
152145
content: |
153-
By default, change streams only return the delta of fields during the update operation.
146+
By default, change streams only return the delta of fields during the update operation.
154147
To return the most current majority-committed version of the updated
155148
document, pass ``"FullDocument = ChangeStreamFullDocumentOption.UpdateLookup"`` to the
156-
:method:`collection.Watch()` method.
149+
:method:`collection.Watch()` method.
157150

158151

159152
If there are one or more majority-committed operations that modified the
160153
updated document *after* the update operation but *before* the lookup, the
161154
full document returned may differ significantly from the document at the time
162155
of the update operation.
163-
164-
However, the deltas included in the change stream document always
165-
correctly describe the watched
156+
157+
However, the deltas included in the change stream document always
158+
correctly describe the watched
166159
collection changes that applied to that change stream event.
167160

168161
Iterate the change stream ``cursor`` to retrieve the change stream
169-
documents in order. In the example below, all update operations notifications
162+
documents in order. In the example below, all update operations notifications
170163
include a ``fullDocument``
171164
field that represents the *current* version of the document affected by the
172165
update operation.
@@ -177,17 +170,17 @@ update operation.
177170
- id: python
178171
content: |
179172
.. class:: copyable-code
180-
173+
181174
.. literalinclude:: /driver-examples/test_examples.py
182175
:language: python
183176
:dedent: 8
184-
:start-after: Start Changestream Example 2
177+
:start-after: Start Changestream Example 2
185178
:end-before: End Changestream Example 2
186179

187180
- id: java-sync
188181
content: |
189182
.. class:: copyable-code
190-
183+
191184
.. literalinclude:: /driver-examples/DocumentationSamples.java
192185
:language: java
193186
:dedent: 8
@@ -197,17 +190,17 @@ update operation.
197190
- id: csharp
198191
content: |
199192
.. class:: copyable-code
200-
193+
201194
.. literalinclude:: /driver-examples/ChangeStreamExamples.cs
202195
:language: C#
203196
:dedent: 12
204197
:start-after: Start Changestream Example 2
205198
:end-before: End Changestream Example 2
206-
199+
207200
- id: c
208201
content: |
209202
.. class:: copyable-code
210-
203+
211204
.. literalinclude:: /driver-examples/test-mongoc-sample-commands.c
212205
:language: C
213206
:dedent: 0
@@ -254,7 +247,6 @@ more of the following pipeline stages when configuring the change stream:
254247

255248
MongoCursor<Document> cursor = collection.watch(pipeline).iterator();
256249

257-
258250
.. tabs-drivers::
259251

260252
tabs:
@@ -271,8 +263,7 @@ more of the following pipeline stages when configuring the change stream:
271263
See :ref:`change-stream-output` for more information on the change stream
272264
response document format.
273265

274-
275-
.. change-stream-resume::
266+
.. _change-stream-resume:
276267

277268
Resume a Change Stream
278269
----------------------
@@ -291,13 +282,13 @@ notification after a specific notification.
291282
token. Passing the ``resumeToken`` to the ``resumeAfter`` modifier directs
292283
the change stream to attempt to resume notifications starting at the
293284
operation specified in the resume token.
294-
285+
295286
.. class:: copyable-code
296-
287+
297288
.. literalinclude:: /driver-examples/test_examples.py
298289
:language: python
299290
:dedent: 8
300-
:start-after: Start Changestream Example 3
291+
:start-after: Start Changestream Example 3
301292
:end-before: End Changestream Example 3
302293

303294
- id: java-sync
@@ -306,9 +297,9 @@ notification after a specific notification.
306297
token. Passing the ``resumeToken`` to the ``resumeAfter()`` method directs
307298
the change stream to attempt to resume notifications starting at the
308299
operation specified in the resume token.
309-
300+
310301
.. class:: copyable-code
311-
302+
312303
.. literalinclude:: /driver-examples/DocumentationSamples.java
313304
:language: java
314305
:dedent: 8
@@ -318,37 +309,35 @@ notification after a specific notification.
318309
- id: csharp
319310
content: |
320311
In the example below, the ``resumeToken`` is retrieved from the last change stream document
321-
and passed to the ``Watch()`` method as an option. Passing the ``resumeToken``
312+
and passed to the ``Watch()`` method as an option. Passing the ``resumeToken``
322313
to the ``Watch()`` method directs
323314
the change stream to attempt to resume notifications starting at the
324315
operation specified in the resume token.
325-
316+
326317
.. class:: copyable-code
327-
318+
328319
.. literalinclude:: /driver-examples/ChangeStreamExamples.cs
329320
:language: C#
330321
:dedent: 12
331322
:start-after: Start Changestream Example 3
332323
:end-before: End Changestream Example 3
333-
324+
334325
- id: c
335326
content: |
336327
In the example below, the ``resumeAfter`` option is appended to the stream options
337328
to recreate the stream after it has been destroyed. Passing the ``_id` to
338329
the change stream attempts to resume notifications starting at the
339330
operation specified.
340-
331+
341332
.. class:: copyable-code
342-
333+
343334
.. literalinclude:: /driver-examples/test-mongoc-sample-commands.c
344335
:language: C
345336
:dedent: 0
346337
:start-after: Start Changestream Example 3
347338
:end-before: End Changestream Example 3
348339

349340

350-
351-
352341
As long as that operation has not rolled off the :term:`oplog`, the
353342
change stream can successfully resume notifications.
354343

0 commit comments

Comments
 (0)