You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/reference/methods.txt
+25-16Lines changed: 25 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -888,12 +888,15 @@ Replication Methods
888
888
889
889
- Description
890
890
891
-
* - ``rs.printSecondaryReplicationInfo()``
891
+
* - ``rs.printSecondaryReplicationInfo``
892
892
893
-
- Returns the status of the secondary members of the replica set. This
894
-
is identical to the ``db.printSecondaryReplicationInfo()`` method.
895
-
The server :method:`rs.printSlaveReplicationInfo()` method is referred
896
-
to as ``rs.printSecondaryReplicationInfo()`` in ``mongosh``.
893
+
- Returns the status of the secondary members of the replica set.
894
+
895
+
This is identical to the ``db.printSecondaryReplicationInfo()``
896
+
method. This method returns the same output as the
897
+
:method:`rs.printSlaveReplicationInfo()` method in the legacy
898
+
:binary:`~mongo` shell. The :method:`rs.printSlaveReplicationInfo()` method is deprecated in ``mongosh``. Use
899
+
``rs.printSecondaryReplicationInfo()`` instead.
897
900
898
901
The following is an example output from the
899
902
``rs.printSecondaryReplicationInfo()`` method issued on a replica set with two secondary members:
@@ -913,12 +916,14 @@ Replication Methods
913
916
replLag: '0 secs (0 hrs) behind the primary '
914
917
}
915
918
916
-
* - ``db.printSecondaryReplicationInfo()``
919
+
* - ``db.printSecondaryReplicationInfo``
917
920
918
-
- Returns the status of the secondary members of the replica set. This
919
-
is identical to the ``rs.printSecondaryReplicationInfo()`` method.
920
-
The server :method:`db.printSlaveReplicationInfo()` method is referred
921
-
to as ``db.printSecondaryReplicationInfo()`` in ``mongosh``.
921
+
- Returns the status of the secondary members of the replica set.
922
+
923
+
This is identical to the ``rs.printSecondaryReplicationInfo()`` method.
924
+
This method returns the same output as the
925
+
:method:`db.printSlaveReplicationInfo()` method. The :method:`db.printSlaveReplicationInfo()` method is deprecated in ``mongosh``. Use
926
+
``db.printSecondaryReplicationInfo()`` instead.
922
927
923
928
The following is an example output from the
924
929
``rs.printSecondaryReplicationInfo()`` method issued on a replica set with two secondary members:
@@ -942,22 +947,26 @@ Replication Methods
942
947
943
948
- Returns the status of the replica set from the oplog data.
944
949
945
-
* - ``rs.isMaster()``
950
+
* - ``rs.isMaster``
946
951
947
952
- Returns the replica set configuration, role, and status for
948
-
the ``mongod`` instance that ``mongosh`` is connected to. The ``mongosh`` ``rs.isMaster()`` method is identical to the server :manual:`isMaster </reference/command/isMaster/>` command.
953
+
the ``mongod`` instance that ``mongosh`` is connected to.
954
+
955
+
The ``mongosh`` ``rs.isMaster()`` method wraps the server :dbcommand:`isMaster` command.
949
956
950
957
* - :method:`rs.printReplicationInfo()`
951
958
952
959
- Returns the oplog of the replica set member that ``mongosh`` is
953
-
connected to. This is identical to the
954
-
:method:`db.printReplicationInfo()` method.
960
+
connected to.
961
+
962
+
This is identical to the :method:`db.printReplicationInfo()` method.
955
963
956
964
* - :method:`db.printReplicationInfo()`
957
965
958
966
- Returns the oplog of the replica set member that ``mongosh`` is
959
-
connected to. This is identical to the
960
-
:method:`rs.printReplicationInfo()` method.
967
+
connected to.
968
+
969
+
This is identical to the :method:`rs.printReplicationInfo()` method.
0 commit comments