@@ -275,83 +275,3 @@ tutorial.
275275.. [#oplog]
276276
277277 .. include:: /includes/fact-oplog-size.rst
278-
279- Oplog Entry Timestamp Error
280- ---------------------------
281-
282- .. todo:: link assertion 13290 here once assertion guide exists.
283-
284- Consider the following error in :binary:`~bin.mongod` output and logs:
285-
286- .. code-block:: javascript
287-
288- replSet error fatal couldn't query the local local.oplog.rs collection. Terminating mongod after 30 seconds.
289- <timestamp> [rsStart] bad replSet oplog entry?
290-
291- Often, an incorrectly typed value in the ``ts`` field in the last
292- :term:`oplog` entry causes this error. The correct data type is
293- Timestamp.
294-
295- Check the type of the ``ts`` value using the following two queries
296- against the oplog collection:
297-
298- .. code-block:: javascript
299-
300- db = db.getSiblingDB("local")
301- db.oplog.rs.find().sort({$natural:-1}).limit(1)
302- db.oplog.rs.find({ts:{$type:17}}).sort({$natural:-1}).limit(1)
303-
304- The first query returns the last document in the oplog, while the
305- second returns the last document in the oplog where the ``ts`` value
306- is a Timestamp. The :query:`$type` operator allows you to select
307- :term:`BSON type <BSON types>` 17, is the Timestamp data type.
308-
309- If the queries don't return the same document, then the last document in
310- the oplog has the wrong data type in the ``ts`` field.
311-
312- .. example::
313-
314- If the first query returns this as the last oplog entry:
315-
316- .. code-block:: javascript
317-
318- { "ts" : {t: 1347982456000, i: 1},
319- "h" : NumberLong("8191276672478122996"),
320- "op" : "n",
321- "ns" : "",
322- "o" : { "msg" : "Reconfig set", "version" : 4 } }
323-
324- And the second query returns this as the last entry where ``ts``
325- has the ``Timestamp`` type:
326-
327- .. code-block:: javascript
328-
329- { "ts" : Timestamp(1347982454000, 1),
330- "h" : NumberLong("6188469075153256465"),
331- "op" : "n",
332- "ns" : "",
333- "o" : { "msg" : "Reconfig set", "version" : 3 } }
334-
335- Then the value for the ``ts`` field in the last oplog entry is of the
336- wrong data type.
337-
338- To set the proper type for this value and resolve this issue,
339- use an update operation that resembles the following:
340-
341- .. code-block:: javascript
342-
343- db.oplog.rs.update( { ts: { t:1347982456000, i:1 } },
344- { $set: { ts: new Timestamp(1347982456000, 1)}})
345-
346- Modify the timestamp values as needed based on your oplog entry. This
347- operation may take some period to complete because the update must
348- scan and pull the entire oplog into memory.
349-
350- Duplicate Key Error on ``local.slaves``
351- ---------------------------------------
352-
353- .. versionchanged:: 3.0.0
354-
355- MongoDB 3.0.0 removes the :data:`local.slaves` collection. For
356- ``local.slaves`` error in earlier versions of MongoDB, refer to the
357- appropriate version of the MongoDB Manual.
0 commit comments