Skip to content

Commit 18619af

Browse files
author
Bob Grabar
committed
DOCS-246 changes to all of change-oplog-size
1 parent 0c1133d commit 18619af

File tree

4 files changed

+113
-219
lines changed

4 files changed

+113
-219
lines changed

source/administration/replica-sets.txt

Lines changed: 15 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ configurations.
5757
.. _replica-set-secondary-only-members:
5858
.. _replica-set-secondary-only-configuration:
5959

60-
Secondary-Only
61-
~~~~~~~~~~~~~~
60+
Secondary-Only Members
61+
~~~~~~~~~~~~~~~~~~~~~~
6262

6363
The secondary-only configuration prevents a :term:`secondary` member in a
6464
:term:`replica set` from ever becoming a :term:`primary` in a
@@ -119,8 +119,8 @@ This sets the following:
119119
.. _replica-set-hidden-members:
120120
.. _replica-set-hidden-configuration:
121121

122-
Hidden
123-
~~~~~~
122+
Hidden Members
123+
~~~~~~~~~~~~~~
124124

125125
Hidden members are part of a replica set but cannot become
126126
primary and are invisible to client applications. *However,*
@@ -164,8 +164,8 @@ other members in the set will not advertise the hidden member in the
164164
.. _replica-set-delayed-members:
165165
.. _replica-set-delayed-configuration:
166166

167-
Delayed
168-
~~~~~~~
167+
Delayed Members
168+
~~~~~~~~~~~~~~~
169169

170170
Delayed members copy and apply operations from the primary's :term:`oplog` with
171171
a specified delay. If a member has a delay of one hour, then
@@ -220,12 +220,9 @@ queries in normal operations.
220220
<members[n].slaveDelay>` window, the delayed member cannot
221221
successfully replicate operations.
222222

223-
.. see:: For more information about delayed members, see the
224-
section on :ref:`Delayed Replication <replica-set-delayed-members>`.
225-
Additionally consider the following resources:
226-
:data:`members[n].slaveDelay`, :ref:`Replica Set Reconfiguration
227-
<replica-set-reconfiguration-usage>`, :ref:`Oplog Sizing
228-
<replica-set-oplog-sizing>`, and :doc:`/tutorial/change-oplog-size`.
223+
.. seealso:: :data:`members[n].slaveDelay`, :ref:`Replica Set Reconfiguration
224+
<replica-set-reconfiguration-usage>`, :ref:`replica-set-oplog-sizing`,
225+
and :doc:`/tutorial/change-oplog-size`.
229226

230227
.. index:: replica set members; arbiters
231228
.. _replica-set-arbiters:
@@ -289,8 +286,8 @@ hostname and the port.
289286
.. _replica-set-non-voting-members:
290287
.. _replica-set-non-voting-configuration:
291288

292-
Non-Voting
293-
~~~~~~~~~~
289+
Non-Voting Members
290+
~~~~~~~~~~~~~~~~~~
294291

295292
You may choose to change the number of votes that each member has in
296293
:ref:`elections <replica-set-elections>` for :term:`primary`. In general, all
@@ -487,36 +484,6 @@ of the member with the highest :data:`members[n].priority` setting.
487484
<replica-set-reconfiguration-usage>` example revolves around
488485
changing the priorities of the :data:`members` of a replica set.
489486

490-
.. _replica-set-procedure-change-oplog-size:
491-
492-
Changing Oplog Size
493-
~~~~~~~~~~~~~~~~~~~
494-
495-
The :term:`oplog` exists internally as a :term:`capped collection`, so
496-
you cannot modify its size in the course of normal operations. In most
497-
cases the :ref:`default oplog size <replica-set-oplog-sizing>` is an
498-
acceptable size; however, in some situations you may need a larger or
499-
smaller oplog. To resize the oplog, follow these steps:
500-
501-
#. Restart the current :term:`primary` instance in the :term:`replica set` in
502-
"standalone" mode, running on a different port.
503-
504-
#. Save the last entry from the old (current) oplog and create a
505-
backup of the oplog.
506-
507-
#. Drop the existing oplog and create a new oplog of a different size.
508-
509-
#. Insert the previously saved last entry from the old oplog into the
510-
new oplog.
511-
512-
#. Restart the server as a member of the replica set on its usual
513-
port.
514-
515-
#. Apply this procedure to any other member of the replica set that
516-
*could become* primary.
517-
518-
.. seealso:: The :doc:`/tutorial/change-oplog-size` tutorial.
519-
520487
.. _replica-set-security:
521488

522489
Security
@@ -657,10 +624,10 @@ Possible causes of replication lag include:
657624

658625
For more information see:
659626

660-
- the :ref:`Replication Write Concern <replica-set-write-concern>` section,
661-
- the :ref:`replica-set-oplog` documentation,
662-
- the :ref:`Oplog Sizing <replica-set-oplog-sizing>` section, and
663-
- the :doc:`/tutorial/change-oplog-size` tutorial.
627+
- :ref:`replica-set-write-concern`.
628+
- The :ref:`replica-set-oplog-sizing` topic in the :doc:`/core/replication` document.
629+
- The :ref:`replica-set-oplog` topic in the :doc:`/core/replication-internals` document.
630+
- The :doc:`/tutorial/change-oplog-size` tutorial.
664631

665632
.. index:: pair: replica set; failover
666633
.. _replica-set-failover-administration:

source/core/replication-internals.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ troubleshooting and for further understanding MongoDB's behavior and approach.
1818
Oplog
1919
-----
2020

21-
For an explanation of the oplog, see the :ref:`oplog <replica-set-oplog-sizing>`
21+
For an explanation of the oplog, see the :ref:`replica-set-oplog-sizing`
2222
topic in the :doc:`/core/replication` document.
2323

2424
Under various exceptional

source/core/replication.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ on the :term:`primary` and then records the operations on the primary's
279279
oplog. The :term:`secondary` members then replicate this log and apply
280280
the operations to themselves in an asynchronous process. All replica set
281281
members contain a copy of the oplog, allowing them to maintain the
282-
current state of the database.
282+
current state of the database. The oplog is an :term:`idempotent` log.
283283

284284
By default, the size of the oplog is as follows:
285285

@@ -297,16 +297,14 @@ By default, the size of the oplog is as follows:
297297

298298
Before oplog creation, you can specify the size of your oplog with the
299299
:setting:`oplogSize` option. Once the oplog is created, you can only
300-
change the size of the oplog by using the :ref:`oplog resizing procedure
301-
<replica-set-procedure-change-oplog-size>`.
302-
303-
.. QUESTION: SK, Can the next graph be rewritten? It's unclear to me. BG
304-
305-
For example, if an oplog fits 24 hours of operations, then members can
306-
stop copying entries from the oplog for 24 hours before they require
307-
full resyncing *and* the disk will be full in 19 days. If this were
308-
the case, you would have a very high-volume member. In many
309-
circumstances, the default oplog can hold days of operations.
300+
change the size of the oplog by using the :doc:`/tutorial/change-oplog-size` tutorial.
301+
302+
In most cases, the default oplog size is sufficient. For example, if an
303+
oplog that is 5% of free disk space fills up in an hour, then
304+
secondaries can stop copying entries from the oplog for 20 hours before
305+
they require full resyncing. If this were the case, you would have a
306+
very high-volume member. In many circumstances, the default oplog can
307+
hold days of operations.
310308

311309
The following factors affect how MongoDB uses space in the oplog:
312310

0 commit comments

Comments
 (0)