Skip to content

Commit 5989e91

Browse files
jdestefano-mongokay-kim
authored andcommitted
DOCSP-632 - Document replSetAbortPrimaryCatchUp command and update info on catchUpTimeoutMillis.
1 parent b38cdf8 commit 5989e91

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

source/includes/ref-toc-command-replication.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ name: ":dbcommand:`isMaster`"
66
file: /reference/command/isMaster
77
description: "Displays information about this member's role in the replica set, including whether it is the master."
88
---
9+
name: ":dbcommand:`replSetAbortPrimaryCatchUp`"
10+
file: /reference/command/replSetAbortPrimaryCatchUp
11+
description: "Forces the elected :term:`primary` to abort sync (catch
12+
up) then complete the transition to primary."
13+
---
914
name: ":dbcommand:`replSetFreeze`"
1015
file: /reference/command/replSetFreeze
1116
description: "Prevents the current member from seeking election as :term:`primary` for a period of time."
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
==========================
2+
replSetAbortPrimaryCatchUp
3+
==========================
4+
5+
.. default-domain:: mongodb
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
Definition
14+
----------
15+
16+
.. dbcommand:: replSetAbortPrimaryCatchUp
17+
18+
The ``replSetAbortPrimaryCatchUp`` command forces the elected
19+
:term:`primary` member of the replica set to abort sync (catch up)
20+
then complete the transition to primary. The command has the
21+
following prototype form:
22+
23+
.. code-block:: javascript
24+
25+
{ replSetAbortPrimaryCatchUp: 1 }

source/reference/replica-configuration.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,21 +492,33 @@ Replica Set Configuration Fields
492492

493493
*Type*: int
494494

495-
*Default*: 2000 (2 seconds)
495+
.. versionchanged:: 3.6
496+
\
497+
498+
*Default*: -1, infinite catchup time.
496499

497500
Time limit in milliseconds for a newly elected primary to sync
498501
(catch up) with the other replica set members that may have more
499-
recent writes. Specifying a higher time limit may reduce the
502+
recent writes. Infinite or high time limits may reduce the
500503
amount of data that the other members would need to roll back
501504
after an election but may increase the failover time.
502505

503506
The newly elected primary ends the catchup period early once it
504507
is fully caught up with other members of the set. During the
505508
catchup period, the newly elected primary is unavailable for
506-
writes from clients.
509+
writes from clients. Use :dbcommand:`replSetAbortPrimaryCatchUp`
510+
to abort the catchup then complete the transition to primary.
507511

508512
The setting only applies when using :rsconf:`protocolVersion: 1`.
509513

514+
.. note::
515+
516+
To downgrade a replica set initiated in version 3.6 to 3.4,
517+
change ``catchUpTimeoutMillis`` from ``-1`` to a
518+
positive number. Failure to change this value to a positive
519+
number causes nodes running version 3.4 to neither restart nor
520+
join the replica set.
521+
510522
.. _repl-conf-catchup-takeover-delay:
511523

512524
.. rsconf:: settings.catchUpTakeoverDelayMillis

0 commit comments

Comments
 (0)