From 838605ad8b45844e8056d517666adede073fcf7b Mon Sep 17 00:00:00 2001 From: Dave Cuthbert Date: Tue, 9 Mar 2021 12:38:02 -0600 Subject: [PATCH] DOCS-14169 change slaveDelay to secondaryDelaySecs --- source/core/replica-set-delayed-member.txt | 6 +++--- source/core/replica-set-elections.txt | 2 +- source/core/replica-set-sync.txt | 8 ++++---- source/includes/extracts-replSetReconfig.yaml | 2 +- .../output-printSecondaryReplicationInfo.rst | 2 +- source/includes/replica-set-conf-document-output.rst | 2 +- ...ographically-distributed-replica-set-5member.yaml | 10 +++++----- source/includes/steps-deploy-replica-set.yaml | 6 +++--- source/reference/command/replSetGetConfig.txt | 6 +++--- .../method/db.printSlaveReplicationInfo.txt | 2 +- source/reference/method/rs.add.txt | 2 +- .../method/rs.printSlaveReplicationInfo.txt | 2 +- source/reference/method/rs.reconfig.txt | 12 ++++++------ source/reference/replica-configuration.txt | 2 +- source/reference/write-concern.txt | 8 ++++---- source/release-notes/5.0-compatibility.txt | 3 +++ .../configure-a-delayed-replica-set-member.txt | 12 ++++++------ source/tutorial/deploy-replica-set-for-testing.txt | 6 +++--- source/tutorial/troubleshoot-replica-sets.txt | 2 +- 19 files changed, 49 insertions(+), 46 deletions(-) diff --git a/source/core/replica-set-delayed-member.txt b/source/core/replica-set-delayed-member.txt index a2e55396eb3..65ac68ca788 100644 --- a/source/core/replica-set-delayed-member.txt +++ b/source/core/replica-set-delayed-member.txt @@ -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 ~~~~~~~~ @@ -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 @@ -105,7 +105,7 @@ number of seconds of delay: "_id" : , "host" : , "priority" : 0, - "slaveDelay" : , + "secondaryDelaySecs" : , "hidden" : true } diff --git a/source/core/replica-set-elections.txt b/source/core/replica-set-elections.txt index d7679beafb5..1cbdd63387b 100644 --- a/source/core/replica-set-elections.txt +++ b/source/core/replica-set-elections.txt @@ -208,7 +208,7 @@ A non-voting member has both :rsconf:`~members[n].votes` and "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 0 } diff --git a/source/core/replica-set-sync.txt b/source/core/replica-set-sync.txt index 7b53a3eef1c..9f1be1e5d41 100644 --- a/source/core/replica-set-sync.txt +++ b/source/core/replica-set-sync.txt @@ -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 - `, the sync source *must not* be delayed. + `, the sync source *must not* be delayed. - If the member *is* a :rsconf:`delayed member - `, the sync source must have a shorter + `, the sync source must have a shorter configured delay. - The sync source *must* be faster (i.e. lower latency) than @@ -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 - `, the sync source *must not* be delayed. + `, the sync source *must not* be delayed. - If the member *is* a :rsconf:`delayed member - `, the sync source must have a shorter + `, the sync source must have a shorter configured delay. - The sync source *must* be faster (i.e. lower latency) than diff --git a/source/includes/extracts-replSetReconfig.yaml b/source/includes/extracts-replSetReconfig.yaml index 745eabc7823..afcd0f994e4 100644 --- a/source/includes/extracts-replSetReconfig.yaml +++ b/source/includes/extracts-replSetReconfig.yaml @@ -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 *or* members that are + ` members *or* members that are :method:`lagging behind ` the primary can increase the time spent in this phase. diff --git a/source/includes/output-printSecondaryReplicationInfo.rst b/source/includes/output-printSecondaryReplicationInfo.rst index f1b25a4ec96..7a01ad4ea8a 100644 --- a/source/includes/output-printSecondaryReplicationInfo.rst +++ b/source/includes/output-printSecondaryReplicationInfo.rst @@ -14,7 +14,7 @@ members: A :ref:`delayed member ` 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 diff --git a/source/includes/replica-set-conf-document-output.rst b/source/includes/replica-set-conf-document-output.rst index be117aeceb1..32418d55517 100644 --- a/source/includes/replica-set-conf-document-output.rst +++ b/source/includes/replica-set-conf-document-output.rst @@ -20,7 +20,7 @@ include only a subset of these settings: hidden: , priority: , tags: , - slaveDelay: , + secondaryDelaySecs: , votes: }, ... diff --git a/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml b/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml index 1069d99e26c..d9278fea776 100644 --- a/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml +++ b/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml @@ -145,7 +145,7 @@ content: | "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -158,7 +158,7 @@ content: | "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -171,7 +171,7 @@ content: | "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -184,7 +184,7 @@ content: | "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -197,7 +197,7 @@ content: | "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } ], diff --git a/source/includes/steps-deploy-replica-set.yaml b/source/includes/steps-deploy-replica-set.yaml index a27bde18c06..2747aef47e2 100644 --- a/source/includes/steps-deploy-replica-set.yaml +++ b/source/includes/steps-deploy-replica-set.yaml @@ -152,7 +152,7 @@ action: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -165,7 +165,7 @@ action: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -178,7 +178,7 @@ action: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } diff --git a/source/reference/command/replSetGetConfig.txt b/source/reference/command/replSetGetConfig.txt index 89c812a74ba..eb440805088 100644 --- a/source/reference/command/replSetGetConfig.txt +++ b/source/reference/command/replSetGetConfig.txt @@ -109,7 +109,7 @@ command run with :ref:`commitmentStatus: true "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -122,7 +122,7 @@ command run with :ref:`commitmentStatus: true "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -135,7 +135,7 @@ command run with :ref:`commitmentStatus: true "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } ], diff --git a/source/reference/method/db.printSlaveReplicationInfo.txt b/source/reference/method/db.printSlaveReplicationInfo.txt index 7c656a5e034..794f50ec43d 100644 --- a/source/reference/method/db.printSlaveReplicationInfo.txt +++ b/source/reference/method/db.printSlaveReplicationInfo.txt @@ -45,5 +45,5 @@ with two secondary members: A :ref:`delayed member ` 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. diff --git a/source/reference/method/rs.add.txt b/source/reference/method/rs.add.txt index 0924cdce83a..566dd1bca6f 100644 --- a/source/reference/method/rs.add.txt +++ b/source/reference/method/rs.add.txt @@ -52,7 +52,7 @@ Definition hidden: , priority: , tags: , - slaveDelay: , + secondaryDelaySecs: , votes: } diff --git a/source/reference/method/rs.printSlaveReplicationInfo.txt b/source/reference/method/rs.printSlaveReplicationInfo.txt index 1b2beca10ec..5249ab019e0 100644 --- a/source/reference/method/rs.printSlaveReplicationInfo.txt +++ b/source/reference/method/rs.printSlaveReplicationInfo.txt @@ -41,7 +41,7 @@ with two secondary members: A :ref:`delayed member ` 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 diff --git a/source/reference/method/rs.reconfig.txt b/source/reference/method/rs.reconfig.txt index 91b93e85fb4..6b15e94aab6 100644 --- a/source/reference/method/rs.reconfig.txt +++ b/source/reference/method/rs.reconfig.txt @@ -251,7 +251,7 @@ A replica set named ``rs0`` has the following configuration: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -264,7 +264,7 @@ A replica set named ``rs0`` has the following configuration: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -277,7 +277,7 @@ A replica set named ``rs0`` has the following configuration: "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } ], @@ -346,7 +346,7 @@ the primary. "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -359,7 +359,7 @@ the primary. "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -372,7 +372,7 @@ the primary. "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } ], diff --git a/source/reference/replica-configuration.txt b/source/reference/replica-configuration.txt index ca0431dddec..8961b4afd0e 100644 --- a/source/reference/replica-configuration.txt +++ b/source/reference/replica-configuration.txt @@ -372,7 +372,7 @@ Replica Set Configuration Fields .. include:: /includes/fact-tags-field.rst - .. rsconf:: members[n].slaveDelay + .. rsconf:: members[n].secondaryDelaySecs *Optional*. diff --git a/source/reference/write-concern.txt b/source/reference/write-concern.txt index 9c448d2afc4..0c35e95d580 100644 --- a/source/reference/write-concern.txt +++ b/source/reference/write-concern.txt @@ -121,7 +121,7 @@ available: :writeconcern:`w: \ <\>` 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. @@ -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 @@ -352,7 +352,7 @@ the write operation in memory or after writing to the on-disk journal. :writeconcern:`w: \ <\>` 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 ---------------------- @@ -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. diff --git a/source/release-notes/5.0-compatibility.txt b/source/release-notes/5.0-compatibility.txt index 89bbb001db9..b04acf99788 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -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 ~~~~~~~~~~~~~~~~~~~ diff --git a/source/tutorial/configure-a-delayed-replica-set-member.txt b/source/tutorial/configure-a-delayed-replica-set-member.txt index 704c921fbe2..243b6541969 100644 --- a/source/tutorial/configure-a-delayed-replica-set-member.txt +++ b/source/tutorial/configure-a-delayed-replica-set-member.txt @@ -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. @@ -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 @@ -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 ` diff --git a/source/tutorial/deploy-replica-set-for-testing.txt b/source/tutorial/deploy-replica-set-for-testing.txt index fbf30216afb..4d6f85e1e80 100644 --- a/source/tutorial/deploy-replica-set-for-testing.txt +++ b/source/tutorial/deploy-replica-set-for-testing.txt @@ -172,7 +172,7 @@ Procedure "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -185,7 +185,7 @@ Procedure "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 }, { @@ -198,7 +198,7 @@ Procedure "tags" : { }, - "slaveDelay" : NumberLong(0), + "secondaryDelaySecs" : NumberLong(0), "votes" : 1 } ], diff --git a/source/tutorial/troubleshoot-replica-sets.txt b/source/tutorial/troubleshoot-replica-sets.txt index 21f6c017dc0..268f82f67ac 100644 --- a/source/tutorial/troubleshoot-replica-sets.txt +++ b/source/tutorial/troubleshoot-replica-sets.txt @@ -62,7 +62,7 @@ To check the current length of replication lag: A :ref:`delayed member ` 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. .. note::