@@ -1137,24 +1137,23 @@ Consider the following error in :program:`mongod` output and logs:
11371137 replSet error fatal couldn't query the local local.oplog.rs collection. Terminating mongod after 30 seconds.
11381138 <timestamp> [rsStart] bad replSet oplog entry?
11391139
1140- The most often cause of this error is wrongly typed value for the
1141- ``ts`` field in the last :term:`oplog` entry might be of the wrong
1142- data type. The correct data type is Timestamp.
1140+ Often, an incorrectly typed value in the ``ts`` field in the last
1141+ :term:`oplog` entry causes this error. The correct data type is
1142+ Timestamp.
11431143
1144- You can check the data type by running the following two queries
1145- against the oplog. If the data is properly typed, the queries will
1146- return the same document, otherwise these queries will return
1147- different documents. These queries are:
1144+ Check the type of the ``ts`` value using the following two queries
1145+ against the oplog collection:
11481146
11491147.. code-block:: javascript
11501148
1149+ db = db.getSiblingDB("local")
11511150 db.oplog.rs.find().sort({$natural:-1}).limit(1)
11521151 db.oplog.rs.find({ts:{$type:17}}).sort({$natural:-1}).limit(1)
11531152
11541153The first query returns the last document in the oplog, while the
11551154second returns the last document in the oplog where the ``ts`` value
11561155is a Timestamp. The :operator:`$type` operator allows you to select
1157- for type 17 ``BSON``, which is the Timestamp data type.
1156+ :term:`BSON type` 17, is the Timestamp data type.
11581157
11591158If the queries don't return the same document, then the last document in
11601159the oplog has the wrong data type in the ``ts`` field.
0 commit comments