Skip to content

Commit 855911d

Browse files
jason-price-mongodbandf-mongodb
authored andcommitted
DOCS-14213 printSecondaryReplicationInfo not documented
1 parent 68fa0b3 commit 855911d

15 files changed

+153
-16
lines changed

.tx/config

+10
Original file line numberDiff line numberDiff line change
@@ -3252,6 +3252,11 @@ file_filter = locale/<lang>/LC_MESSAGES/reference/method/db.cloneCollection.po
32523252
source_file = locale/pot/reference/method/db.cloneCollection.pot
32533253
source_lang = en
32543254

3255+
[mongodb-manual.reference--method--db_printSecondaryReplicationInfo]
3256+
file_filter = locale/<lang>/LC_MESSAGES/reference/method/db.printSecondaryReplicationInfo.po
3257+
source_file = locale/pot/reference/method/db.printSecondaryReplicationInfo.pot
3258+
source_lang = en
3259+
32553260
[mongodb-manual.reference--method--db_printSlaveReplicationInfo]
32563261
file_filter = locale/<lang>/LC_MESSAGES/reference/method/db.printSlaveReplicationInfo.po
32573262
source_file = locale/pot/reference/method/db.printSlaveReplicationInfo.pot
@@ -4087,6 +4092,11 @@ file_filter = locale/<lang>/LC_MESSAGES/reference/method/db.collection.copyTo.po
40874092
source_file = locale/pot/reference/method/db.collection.copyTo.pot
40884093
source_lang = en
40894094

4095+
[mongodb-manual.reference--method--rs_printSecondaryReplicationInfo]
4096+
file_filter = locale/<lang>/LC_MESSAGES/reference/method/rs.printSecondaryReplicationInfo.po
4097+
source_file = locale/pot/reference/method/rs.printSecondaryReplicationInfo.pot
4098+
source_lang = en
4099+
40904100
[mongodb-manual.reference--method--rs_printSlaveReplicationInfo]
40914101
file_filter = locale/<lang>/LC_MESSAGES/reference/method/rs.printSlaveReplicationInfo.po
40924102
source_file = locale/pot/reference/method/rs.printSlaveReplicationInfo.pot
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*Deprecated since version 4.4.1:* Use
2+
:method:`db.printSecondaryReplicationInfo()` instead.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*Deprecated since version 4.4.1:* Use
2+
:method:`rs.printSecondaryReplicationInfo()` instead.

source/includes/extracts-replSetReconfig.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ content: |
3030
Typically, the current configuration has already been installed on
3131
a majority of voting replica set members. However, the majority
3232
committed writes in the previous configuration may not all be
33-
committed in the current configuration.
34-
:rsconf:`Delayed <members[n].slaveDelay>` members *or* members
35-
that are :method:`lagging behind <rs.printSlaveReplicationInfo()>`
36-
the primary can increase the time spent in this phase.
33+
committed in the current configuration. :rsconf:`Delayed
34+
<members[n].slaveDelay>` members *or* members that are
35+
:method:`lagging behind <rs.printSecondaryReplicationInfo()>` the
36+
primary can increase the time spent in this phase.
3737
3838
If the operation was issued with a
3939
|reconfig-maxTimeMS| limit *and*
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. note::
22

3-
The |method| in the :binary:`~bin.mongo` shell does **not** return
4-
:term:`JSON`. Use |method| for manual inspection, and
3+
The |method| method run in the :binary:`~bin.mongo` shell does
4+
**not** return :term:`JSON`. Use |method| for manual inspection, and
55
|method-alternative| in scripts.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Example |method| output when run on a replica set with two secondary
2+
members:
3+
4+
.. code-block:: javascript
5+
6+
source: m1.example.net:27002
7+
syncedTo: Mon Mar 01 2021 16:30:50 GMT-0800 (PST)
8+
0 secs (0 hrs) behind the primary
9+
source: m2.example.net:27003
10+
syncedTo: Mon Mar 01 2021 16:30:50 GMT-0800 (PST)
11+
0 secs (0 hrs) behind the primary
12+
13+
.. include:: /includes/note-method-does-not-return-json.rst
14+
15+
A :ref:`delayed member <replica-set-delayed-members>` may show as ``0``
16+
seconds behind the primary when the inactivity period on the primary is
17+
greater than the :rsconf:`members[n].slaveDelay` value.
18+
19+
A member may show a negative time value behind the primary when |method|
20+
is run. This is expected if |method| is run after a secondary replicates
21+
a write that follows a period of inactivity, but before the secondary
22+
receives a heartbeat from the primary with the latest :term:`optime
23+
<optime>`.
24+
25+
.. note::
26+
27+
The lag reported by secondaries may not be representative of cluster
28+
health. Negative values do not indicate that the secondary is ahead
29+
of the primary.
30+
31+
To obtain the most current status for your replica set, run |method|
32+
on the primary.

source/reference/method.txt

+14-3
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,18 @@ Database
528528

529529
- Prints a report of the status of the replica set from the perspective of the primary.
530530

531+
* - :method:`db.printSecondaryReplicationInfo()`
532+
533+
- Prints the status of the replica set from the
534+
perspective of the secondaries.
535+
531536
* - :method:`db.printShardingStatus()`
532537

533538
- Prints a report of the sharding configuration and the chunk ranges.
534539

535540
* - :method:`db.printSlaveReplicationInfo()`
536541

537-
- Prints a report of the status of the replica set from the perspective of the secondaries.
542+
- .. include:: /includes/deprecated-db.printSlaveReplicationInfo.rst
538543

539544
* - :method:`db.resetError()`
540545

@@ -932,11 +937,17 @@ Replication
932937

933938
* - :method:`rs.printReplicationInfo()`
934939

935-
- Prints a report of the status of the replica set from the perspective of the primary.
940+
- Prints a formatted report of the replica set status from the
941+
perspective of the primary.
942+
943+
* - :method:`rs.printSecondaryReplicationInfo()`
944+
945+
- Prints a formatted report of the replica set status from the
946+
perspective of the secondaries.
936947

937948
* - :method:`rs.printSlaveReplicationInfo()`
938949

939-
- Prints a report of the status of the replica set from the perspective of the secondaries.
950+
- .. include:: /includes/deprecated-rs.printSlaveReplicationInfo.rst
940951

941952
* - :method:`rs.reconfig()`
942953

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
==================================
2+
db.printSecondaryReplicationInfo()
3+
==================================
4+
5+
.. default-domain:: mongodb
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
Definition
14+
----------
15+
16+
.. method:: db.printSecondaryReplicationInfo()
17+
18+
Prints a formatted report of the :term:`replica set` status from the
19+
perspective of the :term:`secondary` member of the set. The output is
20+
identical to the :method:`rs.printSecondaryReplicationInfo()` method.
21+
22+
Output
23+
------
24+
25+
.. |method| replace:: :method:`db.printSecondaryReplicationInfo()`
26+
.. |method-alternative| replace:: :method:`rs.status()`
27+
28+
.. include:: /includes/output-printSecondaryReplicationInfo.rst

source/reference/method/db.printSlaveReplicationInfo.txt

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Definition
1515

1616
.. method:: db.printSlaveReplicationInfo()
1717

18+
.. include:: /includes/deprecated-db.printSlaveReplicationInfo.rst
19+
1820
Returns a formatted report of the status of a :term:`replica set`
1921
from the perspective of the :term:`secondary` member of the set. The
2022
output is identical to that of

source/reference/method/js-database.txt

+9-2
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,21 @@ Database Methods
146146

147147
* - :method:`db.printReplicationInfo()`
148148

149-
- Prints a report of the status of the replica set from the perspective of the primary.
149+
- Prints a formatted report of the replica set status from
150+
the perspective of the primary.
151+
152+
* - :method:`db.printSecondaryReplicationInfo()`
153+
154+
- Prints a formatted report of the replica set status from the
155+
perspective of the secondaries.
150156

151157
* - :method:`db.printShardingStatus()`
152158

153159
- Prints a report of the sharding configuration and the chunk ranges.
154160

155161
* - :method:`db.printSlaveReplicationInfo()`
156162

157-
- Prints a report of the status of the replica set from the perspective of the secondaries.
163+
- .. include:: /includes/deprecated-db.printSlaveReplicationInfo.rst
158164

159165
* - :method:`db.resetError()`
160166

@@ -240,6 +246,7 @@ Database Methods
240246
/reference/method/db.logout
241247
/reference/method/db.printCollectionStats
242248
/reference/method/db.printReplicationInfo
249+
/reference/method/db.printSecondaryReplicationInfo
243250
/reference/method/db.printShardingStatus
244251
/reference/method/db.printSlaveReplicationInfo
245252
/reference/method/db.resetError

source/reference/method/js-replication.txt

+9-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ Replication Methods
4646

4747
* - :method:`rs.printReplicationInfo()`
4848

49-
- Prints a report of the status of the replica set from the perspective of the primary.
49+
- Prints a formatted report of the replica set status from the
50+
perspective of the primary.
51+
52+
* - :method:`rs.printSecondaryReplicationInfo()`
53+
54+
- Prints a formatted report of the replica set status from the
55+
perspective of the secondaries.
5056

5157
* - :method:`rs.printSlaveReplicationInfo()`
5258

53-
- Prints a report of the status of the replica set from the perspective of the secondaries.
59+
- .. include:: /includes/deprecated-rs.printSlaveReplicationInfo.rst
5460

5561
* - :method:`rs.reconfig()`
5662

@@ -88,6 +94,7 @@ Replication Methods
8894
/reference/method/rs.help
8995
/reference/method/rs.initiate
9096
/reference/method/rs.printReplicationInfo
97+
/reference/method/rs.printSecondaryReplicationInfo
9198
/reference/method/rs.printSlaveReplicationInfo
9299
/reference/method/rs.reconfig
93100
/reference/method/rs.remove
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
==================================
2+
rs.printSecondaryReplicationInfo()
3+
==================================
4+
5+
.. default-domain:: mongodb
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
Definition
14+
----------
15+
16+
.. method:: rs.printSecondaryReplicationInfo()
17+
18+
Prints a formatted report of the :term:`replica set` status from the
19+
perspective of the :term:`secondary` member of the set. The output is
20+
identical to :method:`db.printSecondaryReplicationInfo()`.
21+
22+
Output
23+
------
24+
25+
.. |method| replace:: :method:`rs.printSecondaryReplicationInfo()`
26+
.. |method-alternative| replace:: :method:`rs.status()`
27+
28+
.. include:: /includes/output-printSecondaryReplicationInfo.rst

source/reference/method/rs.printSlaveReplicationInfo.txt

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Definition
1515

1616
.. method:: rs.printSlaveReplicationInfo()
1717

18+
.. include:: /includes/deprecated-rs.printSlaveReplicationInfo.rst
19+
1820
Returns a formatted report of the status of a :term:`replica set`
1921
from the perspective of the :term:`secondary` member of the set. The
2022
output is identical to that of

source/reference/replication.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ Replication Methods in the ``mongo`` Shell
4747

4848
* - :method:`rs.printReplicationInfo()`
4949

50-
- Prints a report of the status of the replica set from the perspective of the primary.
50+
- Prints a formatted report of the replica set status from the
51+
perspective of the primary.
52+
53+
* - :method:`rs.printSecondaryReplicationInfo()`
54+
55+
- Prints a formatted report of the replica set status from the
56+
perspective of the secondaries.
5157

5258
* - :method:`rs.printSlaveReplicationInfo()`
5359

54-
- Prints a report of the status of the replica set from the perspective of the secondaries.
60+
- .. include:: /includes/deprecated-rs.printSlaveReplicationInfo.rst
5561

5662
* - :method:`rs.reconfig()`
5763

source/tutorial/troubleshoot-replica-sets.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ will be inconsistent.
4545
To check the current length of replication lag:
4646

4747
- In a :binary:`~bin.mongo` shell connected to the primary, call the
48-
:method:`rs.printSlaveReplicationInfo()` method.
48+
:method:`rs.printSecondaryReplicationInfo()` method.
4949

5050
Returns the ``syncedTo`` value for each member,
5151
which shows the time when the last oplog entry was written to the

0 commit comments

Comments
 (0)