diff --git a/source/includes/ref-toc-command-replication.yaml b/source/includes/ref-toc-command-replication.yaml index 66eea269cba..e525e0fe6c5 100644 --- a/source/includes/ref-toc-command-replication.yaml +++ b/source/includes/ref-toc-command-replication.yaml @@ -6,6 +6,11 @@ name: ":dbcommand:`isMaster`" file: /reference/command/isMaster description: "Displays information about this member's role in the replica set, including whether it is the master." --- +name: ":dbcommand:`replSetAbortPrimaryCatchUp`" +file: /reference/command/replSetAbortPrimaryCatchUp +description: "Forces the elected :term:`primary` to abort sync (catch +up) then complete the transition to primary." +--- name: ":dbcommand:`replSetFreeze`" file: /reference/command/replSetFreeze description: "Prevents the current member from seeking election as :term:`primary` for a period of time." diff --git a/source/reference/command/replSetAbortPrimaryCatchUp.txt b/source/reference/command/replSetAbortPrimaryCatchUp.txt new file mode 100644 index 00000000000..4b1be901146 --- /dev/null +++ b/source/reference/command/replSetAbortPrimaryCatchUp.txt @@ -0,0 +1,25 @@ +========================== +replSetAbortPrimaryCatchUp +========================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Definition +---------- + +.. dbcommand:: replSetAbortPrimaryCatchUp + + The ``replSetAbortPrimaryCatchUp`` command forces the elected + :term:`primary` member of the replica set to abort sync (catch up) + then complete the transition to primary. The command has the + following prototype form: + + .. code-block:: javascript + + { replSetAbortPrimaryCatchUp: 1 } diff --git a/source/reference/replica-configuration.txt b/source/reference/replica-configuration.txt index ef03fed92ca..b6099cd9cd0 100644 --- a/source/reference/replica-configuration.txt +++ b/source/reference/replica-configuration.txt @@ -492,21 +492,33 @@ Replica Set Configuration Fields *Type*: int - *Default*: 2000 (2 seconds) + .. versionchanged:: 3.6 + \ + + *Default*: -1, infinite catchup time. Time limit in milliseconds for a newly elected primary to sync (catch up) with the other replica set members that may have more - recent writes. Specifying a higher time limit may reduce the + recent writes. Infinite or high time limits may reduce the amount of data that the other members would need to roll back after an election but may increase the failover time. The newly elected primary ends the catchup period early once it is fully caught up with other members of the set. During the catchup period, the newly elected primary is unavailable for - writes from clients. + writes from clients. Use :dbcommand:`replSetAbortPrimaryCatchUp` + to abort the catchup then complete the transition to primary. The setting only applies when using :rsconf:`protocolVersion: 1`. + .. note:: + + To downgrade a replica set initiated in version 3.6 to 3.4, + change ``catchUpTimeoutMillis`` from ``-1`` to a + positive number. Failure to change this value to a positive + number causes nodes running version 3.4 to neither restart nor + join the replica set. + .. _repl-conf-catchup-takeover-delay: .. rsconf:: settings.catchUpTakeoverDelayMillis