Skip to content

DOCS-14169 change slaveDelay to secondaryDelaySecs #5078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/core/replica-set-delayed-member.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ delayed members must also be voting members (i.e.
acknowledging write operations with ``majority`` write concern.

Delayed secondaries can return write acknowledgment no earlier than the
configured :rsconf:`~members[n].slaveDelay`.
configured :rsconf:`~members[n].secondaryDelaySecs`.

Sharding
~~~~~~~~
Expand All @@ -96,7 +96,7 @@ Configuration
A delayed member has its
:rsconf:`members[n].priority` equal to ``0``,
:rsconf:`members[n].hidden` equal to ``true``, and
its :rsconf:`members[n].slaveDelay` equal to the
its :rsconf:`members[n].secondaryDelaySecs` equal to the
number of seconds of delay:

.. code-block:: javascript
Expand All @@ -105,7 +105,7 @@ number of seconds of delay:
"_id" : <num>,
"host" : <hostname:port>,
"priority" : 0,
"slaveDelay" : <seconds>,
"secondaryDelaySecs" : <seconds>,
"hidden" : true
}

Expand Down
2 changes: 1 addition & 1 deletion source/core/replica-set-elections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ A non-voting member has both :rsconf:`~members[n].votes` and
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 0
}

Expand Down
8 changes: 4 additions & 4 deletions source/core/replica-set-sync.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ the list of all replica set members:
replica set elections, the sync source *must* also vote.

- If the member is *not* a :rsconf:`delayed member
<members[n].slaveDelay>`, the sync source *must not* be delayed.
<members[n].secondaryDelaySecs>`, the sync source *must not* be delayed.

- If the member *is* a :rsconf:`delayed member
<members[n].slaveDelay>`, the sync source must have a shorter
<members[n].secondaryDelaySecs>`, the sync source must have a shorter
configured delay.

- The sync source *must* be faster (i.e. lower latency) than
Expand Down Expand Up @@ -321,10 +321,10 @@ through the list of all replica set members:
replica set elections, the sync source *must* also vote.

- If the member is *not* a :rsconf:`delayed member
<members[n].slaveDelay>`, the sync source *must not* be delayed.
<members[n].secondaryDelaySecs>`, the sync source *must not* be delayed.

- If the member *is* a :rsconf:`delayed member
<members[n].slaveDelay>`, the sync source must have a shorter
<members[n].secondaryDelaySecs>`, the sync source must have a shorter
configured delay.

- The sync source *must* be faster (i.e. lower latency) than
Expand Down
2 changes: 1 addition & 1 deletion source/includes/extracts-replSetReconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ content: |
a majority of voting replica set members. However, the majority
committed writes in the previous configuration may not all be
committed in the current configuration. :rsconf:`Delayed
<members[n].slaveDelay>` members *or* members that are
<members[n].secondaryDelaySecs>` members *or* members that are
:method:`lagging behind <rs.printSecondaryReplicationInfo()>` the
primary can increase the time spent in this phase.

Expand Down
2 changes: 1 addition & 1 deletion source/includes/output-printSecondaryReplicationInfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members:

A :ref:`delayed member <replica-set-delayed-members>` may show as ``0``
seconds behind the primary when the inactivity period on the primary is
greater than the :rsconf:`members[n].slaveDelay` value.
greater than the :rsconf:`members[n].secondaryDelaySecs` value.

A member may show a negative time value behind the primary when |method|
is run. This is expected if |method| is run after a secondary replicates
Expand Down
2 changes: 1 addition & 1 deletion source/includes/replica-set-conf-document-output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include only a subset of these settings:
hidden: <boolean>,
priority: <number>,
tags: <document>,
slaveDelay: <int>,
secondaryDelaySecs: <int>,
votes: <number>
},
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ content: |
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -158,7 +158,7 @@ content: |
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -171,7 +171,7 @@ content: |
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -184,7 +184,7 @@ content: |
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -197,7 +197,7 @@ content: |
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}
],
Expand Down
6 changes: 3 additions & 3 deletions source/includes/steps-deploy-replica-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ action:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -165,7 +165,7 @@ action:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -178,7 +178,7 @@ action:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}

Expand Down
6 changes: 3 additions & 3 deletions source/reference/command/replSetGetConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ command run with :ref:`commitmentStatus: true
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -122,7 +122,7 @@ command run with :ref:`commitmentStatus: true
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -135,7 +135,7 @@ command run with :ref:`commitmentStatus: true
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}
],
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/db.printSlaveReplicationInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ with two secondary members:

A :ref:`delayed member <replica-set-delayed-members>` may show as ``0``
seconds behind the primary when the inactivity period on the primary is
greater than the :rsconf:`members[n].slaveDelay`
greater than the :rsconf:`members[n].secondaryDelaySecs`
value.
2 changes: 1 addition & 1 deletion source/reference/method/rs.add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Definition
hidden: <boolean>,
priority: <number>,
tags: <document>,
slaveDelay: <int>,
secondaryDelaySecs: <int>,
votes: <number>
}

Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/rs.printSlaveReplicationInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ with two secondary members:

A :ref:`delayed member <replica-set-delayed-members>` may show as ``0``
seconds behind the primary when the inactivity period on the primary is
greater than the :rsconf:`members[n].slaveDelay`
greater than the :rsconf:`members[n].secondaryDelaySecs`
value.

A member may show a negative time value behind the primary when
Expand Down
12 changes: 6 additions & 6 deletions source/reference/method/rs.reconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ A replica set named ``rs0`` has the following configuration:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -264,7 +264,7 @@ A replica set named ``rs0`` has the following configuration:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -277,7 +277,7 @@ A replica set named ``rs0`` has the following configuration:
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}
],
Expand Down Expand Up @@ -346,7 +346,7 @@ the primary.
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -359,7 +359,7 @@ the primary.
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -372,7 +372,7 @@ the primary.
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}
],
Expand Down
2 changes: 1 addition & 1 deletion source/reference/replica-configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Replica Set Configuration Fields

.. include:: /includes/fact-tags-field.rst

.. rsconf:: members[n].slaveDelay
.. rsconf:: members[n].secondaryDelaySecs

*Optional*.

Expand Down
8 changes: 4 additions & 4 deletions source/reference/write-concern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ available:
:writeconcern:`w: \<number\> <\<number\>>` write operations.

Delayed secondaries can return write acknowledgment no earlier
than the configured :rsconf:`~members[n].slaveDelay`.
than the configured :rsconf:`~members[n].secondaryDelaySecs`.

See :ref:`wc-ack-behavior` for when :binary:`~bin.mongod` instances
acknowledge the write.
Expand All @@ -148,7 +148,7 @@ available:
can acknowledge :writeconcern:`"majority"` write operations.

Delayed secondaries can return write acknowledgment no earlier
than the configured :rsconf:`~members[n].slaveDelay`.
than the configured :rsconf:`~members[n].secondaryDelaySecs`.

After the write operation returns with a :writeconcern:`w:
"majority" <"majority">` acknowledgment to the client, the
Expand Down Expand Up @@ -352,7 +352,7 @@ the write operation in memory or after writing to the on-disk journal.
:writeconcern:`w: \<number\> <\<number\>>` write operations.

Delayed secondaries can return write acknowledgment no earlier
than the configured :rsconf:`~members[n].slaveDelay`.
than the configured :rsconf:`~members[n].secondaryDelaySecs`.

Additional Information
----------------------
Expand Down Expand Up @@ -385,7 +385,7 @@ For details, see :ref:`causal-consistency`.
can acknowledge :writeconcern:`"majority"` write operations.

- Delayed secondaries can return write acknowledgment no earlier
than the configured :rsconf:`~members[n].slaveDelay`.
than the configured :rsconf:`~members[n].secondaryDelaySecs`.

- Starting in MongoDB 4.4, replica set members in the
:replstate:`STARTUP2` state do not participate in write majorities.
Expand Down
3 changes: 3 additions & 0 deletions source/release-notes/5.0-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Tools Changes
Replica Sets
------------

Starting in MongoDB 5.0, :rsconf:`~members[n].secondaryDelaySecs`
replaces ``slaveDelay``. This change is not backwards compatible.

Manual Oplog Writes
~~~~~~~~~~~~~~~~~~~

Expand Down
12 changes: 6 additions & 6 deletions source/tutorial/configure-a-delayed-replica-set-member.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Configure a Delayed Replica Set Member
To configure a delayed secondary member, set its
:rsconf:`members[n].priority` value to ``0``, its
:rsconf:`members[n].hidden` value to ``true``, and
its :rsconf:`members[n].slaveDelay` value to the
its :rsconf:`members[n].secondaryDelaySecs` value to the
number of seconds to delay.

.. important::

The length of the secondary
:rsconf:`members[n].slaveDelay` must
:rsconf:`members[n].secondaryDelaySecs` must
fit within the window of the oplog. If the oplog is shorter than
the :rsconf:`members[n].slaveDelay`
the :rsconf:`members[n].secondaryDelaySecs`
window, the delayed member cannot successfully replicate
operations.

Expand All @@ -46,12 +46,12 @@ connected to the primary:
cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
cfg.members[0].slaveDelay = 3600
cfg.members[0].secondaryDelaySecs = 3600
rs.reconfig(cfg)

After the replica set reconfigures, the delayed secondary member cannot
become :term:`primary` and is hidden from applications. The
:rsconf:`members[n].slaveDelay` value delays both
:rsconf:`members[n].secondaryDelaySecs` value delays both
replication and the member's :term:`oplog` by 3600 seconds (1 hour).

.. include:: /includes/fact-rs-conf-array-index.rst
Expand All @@ -61,7 +61,7 @@ replication and the member's :term:`oplog` by 3600 seconds (1 hour).
Related Documents
-----------------

- :rsconf:`members[n].slaveDelay`
- :rsconf:`members[n].secondaryDelaySecs`

- :ref:`Replica Set Reconfiguration
<replica-set-reconfiguration-usage>`
Expand Down
6 changes: 3 additions & 3 deletions source/tutorial/deploy-replica-set-for-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Procedure
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -185,7 +185,7 @@ Procedure
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
},
{
Expand All @@ -198,7 +198,7 @@ Procedure
"tags" : {

},
"slaveDelay" : NumberLong(0),
"secondaryDelaySecs" : NumberLong(0),
"votes" : 1
}
],
Expand Down
Loading