Skip to content

Commit 68f50ee

Browse files
author
Bob Grabar
committed
DOCS-467 minor: review edits
1 parent 20bd361 commit 68f50ee

File tree

1 file changed

+43
-33
lines changed

1 file changed

+43
-33
lines changed

source/administration/replica-sets.txt

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ of the information displayed by :method:`rs.status()`, see
581581
:doc:`/reference/replica-status`.
582582

583583
.. note:: The :method:`rs.status()` method is a wrapper that runs the
584-
:doc:`/reference/command/replSetGetStatus` database command.
584+
:dbcommand:`replSetGetStatus` database command.
585585

586586
.. _replica-set-replication-lag:
587587

@@ -596,14 +596,13 @@ replication lag makes "lagged" members ineligible to quickly become
596596
primary and increases the possibility that distributed
597597
read operations will be inconsistent.
598598

599-
To check the current duration of replication lag, do one of the following:
599+
To check the current length of replication lag:
600600

601-
- Run the :doc:`db.printSlaveReplicationInfo()
602-
</reference/method/db.printSlaveReplicationInfo>` method in a
603-
:program:`mongo` shell connected to the replica set's primary.
601+
- In a :program:`mongo` shell connected to the primary, call the
602+
:method:`db.printSlaveReplicationInfo()` method.
604603

605-
The output displays each member's ``syncedTo`` value, which is the
606-
last time the member read from the oplog, as shown in the following
604+
The outputted document displays the ``syncedTo`` value for each member,
605+
which shows you when each member last read from the oplog, as shown in the following
607606
example:
608607

609608
.. code-block:: javascript
@@ -616,21 +615,16 @@ To check the current duration of replication lag, do one of the following:
616615
= 7475 secs ago (2.08hrs)
617616

618617
.. note:: The :method:`rs.status()` method is a wrapper that runs the
619-
:doc:`/reference/command/replSetGetStatus` database command.
618+
:dbcommand:`replSetGetStatus` database command.
620619

621-
- Run the :method:`rs.status()` method in a :program:`mongo` shell
622-
connected to the replica set's primary. The output displays each
623-
member's `optimeDate` value, which is the last time the member read
624-
from the oplog.
625-
626-
- Monitor how fast replication occurs by watching the oplog time in the
620+
- Monitor the rate of replication by watching the oplog time in the
627621
"replica" graph in the `MongoDB Monitoring Service`_. For more
628622
information see the `documentation for MMS`_.
629623

630624
.. _`MongoDB Monitoring Service`: http://mms.10gen.com/
631625
.. _`documentation for MMS`: http://mms.10gen.com/help/
632626

633-
If replication lag is too large, check the following:
627+
Possible causes of replication lag include:
634628

635629
- **Network Latency**
636630

@@ -699,31 +693,36 @@ staying up-to-date or becoming stale.
699693

700694
To check the size of the oplog for a given :term:`replica set` member,
701695
connect to the member in a :program:`mongo` shell and run the
702-
:doc:`db.printReplicationInfo()
703-
</reference/method/db.printReplicationInfo>` method.
696+
:method:`db.printReplicationInfo()` method.
704697

705-
The method displays the size of the oplog and the date ranges of the
698+
The output displays the size of the oplog and the date ranges of the
706699
operations contained in the oplog. In the following example, the oplog
707-
is about 10MB and is able to fit only about 20 minutes (1200 seconds) of
700+
is about 10MB and is able to fit about 26 hours (94400 seconds) of
708701
operations:
709702

710703
.. code-block:: javascript
711704

712705
configured oplog size: 10.10546875MB
713-
log length start to end: 1200secs (0.33hrs)
706+
log length start to end: 94400 (26.22hrs)
714707
oplog first event time: Mon Mar 19 2012 13:50:38 GMT-0400 (EDT)
715-
oplog last event time: Tue Oct 02 2012 16:31:38 GMT-0400 (EDT)
716-
now: Tue Oct 02 2012 17:04:20 GMT-0400 (EDT)
708+
oplog last event time: Wed Oct 03 2012 14:59:10 GMT-0400 (EDT)
709+
now: Wed Oct 03 2012 15:00:21 GMT-0400 (EDT)
717710

711+
The oplog should be long enough to hold all transactions for the longest
712+
downtime you expect on a secondary. In many cases, an oplog should fit
713+
at minimum 24 hours of operations. A size of 72 hours is often
714+
preferred. And it is not uncommon for an oplog to fit a week's worth of
715+
operations.
718716

719-
The above example is likely a case where you would want to increase the
720-
size of the oplog. For more information on how oplog size affects
721-
operations, see:
717+
For more information on how oplog size affects operations, see:
722718

723719
- The :ref:`replica-set-oplog-sizing` topic in the :doc:`/core/replication` document.
724720
- The :ref:`replica-set-delayed-members` topic in this document.
725721
- The :ref:`replica-set-replication-lag` topic in this document.
726722

723+
.. note:: You normally want the oplog to be the same size on all
724+
members. If you resize the oplog, resize it on all members.
725+
727726
To change oplog size, see :ref:`replica-set-procedure-change-oplog-size`
728727
in this document or see the :doc:`/tutorial/change-oplog-size` tutorial.
729728

@@ -745,19 +744,30 @@ every other member, in both directions, consider the following example:
745744
- ``m2.example.net``
746745
- ``m3.example.net``
747746

748-
You can test the connection from ``m1.example.net`` to the other hosts by running
749-
the following operations from ``m1.example.net``:
747+
1. Test the connection from ``m1.example.net`` to the other hosts by running
748+
the following operations from ``m1.example.net``:
749+
750+
.. code-block:: sh
751+
752+
mongo --host m2.example.net --port 27017"
750753

751-
.. code-block:: sh
754+
mongo --host m3.example.net --port 27017"
752755

753-
mongo --host m2.example.net --port 27017"
756+
#. Test the connection from ``m2.example.net`` to the other two
757+
hosts by running similar appropriate operations from ``m2.example.net``.
754758

755-
mongo --host m3.example.net --port 27017"
759+
This means you have now tested the connection between
760+
``m2.example.net`` and ``m1.example.net`` twice, but each time
761+
from a different direction. This is important to verifying
762+
connectivity. Network topologies and firewalls might allow a
763+
connection in one direction but not the other. Therefore you must
764+
make sure to verify that the connection works in both directions.
756765

757-
Repeat the process on hosts ``m2.example.net`` and ``m3.example.net``.
766+
#. Test the connection from ``m3.example.net`` to the other two
767+
hosts by running the operations from ``m3.example.net``.
758768

759-
If any of the connections fails, there's a networking or firewall
760-
issue that needs to be diagnosed separately
769+
If a connection in any direction fails, there's a networking or
770+
firewall issue that needs to be diagnosed separately.
761771

762772
.. index:: pair: replica set; failover
763773
.. _replica-set-failover-administration:

0 commit comments

Comments
 (0)