@@ -713,12 +713,11 @@ If you receive the following error:
713
713
Then the value for the ``ts`` field in the last oplog entry might be of
714
714
the wrong data type. The correct data type is Timestamp.
715
715
716
- You can check the data type by running the following two queries. If the
716
+ You can check the data type by running the following two queries against the oplog . If the
717
717
data type is correct, the queries return the same document; if
718
718
incorrect, they return different documents.
719
719
720
- First run a query to return the last document in the oplog, no matter
721
- its data type:
720
+ First run a query to return the last document in the oplog:
722
721
723
722
.. code-block:: javascript
724
723
@@ -732,13 +731,16 @@ for type ``17``, which is the Timestamp data type.
732
731
733
732
db.oplog.rs.find({ts:{$type:17}}).sort({$natural:-1}).limit(1)
734
733
734
+ If the queries don't return the same document, then the last document in
735
+ the oplog has the wrong data type in the ``ts`` field.
736
+
735
737
.. example::
736
738
737
739
As an example, if the first query returns this as the last oplog entry:
738
740
739
741
.. code-block:: javascript
740
742
741
- { "h" : NumberLong("8191276672478122996"), "ns" : "", "o" : { "msg" : "Reconfig set", "version" : 4 }, "op" : "n", "ts" : true }
743
+ { "ts" : {t: 1347982456000, i: 1}, " h" : NumberLong("8191276672478122996"), "op" : "n", " ns" : "", "o" : { "msg" : "Reconfig set", "version" : 4 } }
742
744
743
745
And the second query returns this as the last entry where ``ts`` is a Timestamp:
744
746
@@ -755,4 +757,4 @@ time to pull the oplog into memory:
755
757
756
758
.. code-block:: javascript
757
759
758
- db.oplog.rs.update({ts:{t:1234567891000 ,i:1234 }}, {$set:{ts:new Timestamp(1234567891000, 1234 )}})
760
+ db.oplog.rs.update({ts:{t:1347982456000 ,i:1 }}, {$set:{ts:new Timestamp(1347982456000, 1 )}})
0 commit comments