@@ -652,6 +652,8 @@ Possible causes of replication lag include:
652
652
Failover and Recovery
653
653
~~~~~~~~~~~~~~~~~~~~~
654
654
655
+ .. TODO Revisit whether this belongs in troubleshooting. Perhaps this should be an H2 before troubleshooting.
656
+
655
657
Replica sets feature automated failover. If the :term:`primary`
656
658
goes offline or becomes unresponsive and a majority of the original
657
659
set members can still connect to each other, the set will elect a new
@@ -695,3 +697,38 @@ You can prevent rollbacks by ensuring safe writes by using
695
697
the appropriate :term:`write concern`.
696
698
697
699
.. include:: /includes/seealso-elections.rst
700
+
701
+ Oplog Entry Error
702
+ ~~~~~~~~~~~~~~~~~
703
+
704
+ .. TODO link this topic to assertion 13290 once assertion guide exists.
705
+
706
+ If you receive the following errors:
707
+
708
+ .. code-block:: javascript
709
+
710
+ replSet error fatal couldn't query the local local.oplog.rs collection. Terminating mongod after 30 seconds.
711
+ bad replSet oplog entry?
712
+
713
+ Then the errors might indicate that the ``ts`` field in the last oplog
714
+ entry is of the wrong data type.
715
+
716
+ You can check this with the following command:
717
+
718
+ .. code-block:: javascript
719
+
720
+ db.oplog.rs.find({ts:{$type:17}}).({$natural:-1}).limit(1)
721
+
722
+ If the ts field is of the wrong type, you receive the same error.
723
+
724
+ To verify there are no other issues, run the following command:
725
+
726
+ db.oplog.rs.find().({$natural:-1}).limit(1)
727
+
728
+ If there are no other issues, this returns without error.
729
+
730
+ To fix the ``ts`` data type, run the following:
731
+
732
+ .. code-block:: javascript
733
+
734
+ db.oplog.rs.update({ts:{t:1234567891000,i:1234}}, {$set:{ts:new Timestamp(1234567891000, 1234)}})
0 commit comments