Skip to content

Commit 86d5f0c

Browse files
jason-price-mongodbandf-mongodb
authored andcommitted
DOCS-14213 printSecondaryReplicationInfo not documented
1 parent 419067c commit 86d5f0c

14 files changed

+149
-12
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 4.2.10:* 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 4.2.10:* Use
2+
:method:`rs.printSecondaryReplicationInfo()` instead.
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
@@ -520,13 +520,18 @@ Database
520520

521521
- Prints a report of the status of the replica set from the perspective of the primary.
522522

523+
* - :method:`db.printSecondaryReplicationInfo()`
524+
525+
- Prints the status of the replica set from the
526+
perspective of the secondaries.
527+
523528
* - :method:`db.printShardingStatus()`
524529

525530
- Prints a report of the sharding configuration and the chunk ranges.
526531

527532
* - :method:`db.printSlaveReplicationInfo()`
528533

529-
- Prints a report of the status of the replica set from the perspective of the secondaries.
534+
- .. include:: /includes/deprecated-db.printSlaveReplicationInfo.rst
530535

531536
* - :method:`db.resetError()`
532537

@@ -931,11 +936,17 @@ Replication
931936

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

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

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

938-
- Prints a report of the status of the replica set from the perspective of the secondaries.
949+
- .. include:: /includes/deprecated-rs.printSlaveReplicationInfo.rst
939950

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

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
@@ -150,15 +150,21 @@ Database Methods
150150

151151
* - :method:`db.printReplicationInfo()`
152152

153-
- Prints a report of the status of the replica set from the perspective of the primary.
153+
- Prints a formatted report of the replica set status from
154+
the perspective of the primary.
155+
156+
* - :method:`db.printSecondaryReplicationInfo()`
157+
158+
- Prints a formatted report of the replica set status from the
159+
perspective of the secondaries.
154160

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

157163
- Prints a report of the sharding configuration and the chunk ranges.
158164

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

161-
- Prints a report of the status of the replica set from the perspective of the secondaries.
167+
- .. include:: /includes/deprecated-db.printSlaveReplicationInfo.rst
162168

163169
* - :method:`db.resetError()`
164170

@@ -245,6 +251,7 @@ Database Methods
245251
/reference/method/db.logout
246252
/reference/method/db.printCollectionStats
247253
/reference/method/db.printReplicationInfo
254+
/reference/method/db.printSecondaryReplicationInfo
248255
/reference/method/db.printShardingStatus
249256
/reference/method/db.printSlaveReplicationInfo
250257
/reference/method/db.resetError

source/reference/method/js-replication.txt

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

0 commit comments

Comments
 (0)