Skip to content

Commit c6b4123

Browse files
DOCS-14213 printSecondaryReplicationInfo not documented
1 parent 1e1c2b8 commit c6b4123

16 files changed

+161
-16
lines changed

.tx/config

Lines changed: 10 additions & 0 deletions
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
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*Deprecated since version 3.6.21:* Use
2+
:method:`db.printSecondaryReplicationInfo()` instead.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*Deprecated since version 3.6.21:* Use
2+
:method:`rs.printSecondaryReplicationInfo()` instead.

source/includes/extracts-replSetReconfig.yaml

Lines changed: 4 additions & 4 deletions
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*
Lines changed: 2 additions & 2 deletions
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.
Lines changed: 32 additions & 0 deletions
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

Lines changed: 14 additions & 3 deletions
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

Lines changed: 28 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 9 additions & 2 deletions
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

0 commit comments

Comments
 (0)