diff --git a/source/includes/ref-toc-command-replication.yaml b/source/includes/ref-toc-command-replication.yaml index 07c5279a72d..7acf487dcda 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 ecc0c3a98a8..21c618dbf1e 100644 --- a/source/reference/replica-configuration.txt +++ b/source/reference/replica-configuration.txt @@ -480,18 +480,30 @@ Replica Set Configuration Fields *Type*: int - *Default*: 2000 (2 seconds) + .. list-table:: + :header-rows: 1 + :widths: 50 50 + + * - Default Value + - MongoDB Version + + * - 60000 (60 seconds) + - 3.4.6+ + + * - 2000 (2 seconds) + - 3.4.0 - 3.4.5 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`.