@@ -15,33 +15,30 @@ Definition
15
15
16
16
.. include:: /includes/apiargs/method-rs.reconfig-param.rst
17
17
18
- When used to reconfigure an existing replica set, first retrieve the
18
+ To reconfigure an existing replica set, first retrieve the
19
19
current configuration with :method:`rs.conf()`, modify the
20
20
configuration document as needed, and then pass the modified
21
21
document to :method:`rs.reconfig()`.
22
22
23
23
:method:`rs.reconfig()` provides a wrapper around the
24
24
:dbcommand:`replSetReconfig` command.
25
+
26
+ The ``force`` parameter allows a reconfiguration command to be issued
27
+ to a non-primary node.
25
28
26
29
Behavior
27
30
--------
28
31
29
- The method disconnects the :program:`mongo` shell and forces a
30
- reconnection as the replica set renegotiates which member will be
31
- :term:`primary`. As a result, the shell will display an error even if
32
- this command succeeds.
33
-
34
- The :method:`rs.reconfig()` shell method can force the current primary
35
- to step down and triggers an election in some situations. When the
36
- primary steps down, the primary closes all client connections. This is
37
- by design. Since this typically takes 10-20 seconds, attempt to make
38
- such changes during scheduled maintenance periods.
32
+ The :method:`rs.reconfig()` shell method can trigger the current primary
33
+ to step down in some situations. When the
34
+ primary steps down, it forceably closes all client connections. This is
35
+ by design. Since it may take a period of time to elect a new primary,
36
+ schedule reconfiguration changes during maintenance periods to minimize loss of write availability.
39
37
40
38
.. warning::
41
39
42
40
Using :method:`rs.reconfig()` with ``{ force: true }`` can lead to
43
- :term:`rollback` situations and other difficult-to-recover-from
44
- situations. Exercise caution when using this option.
41
+ :term:`rollback` of committed writes. Exercise caution when using this option.
45
42
46
43
.. _replica-set-reconfiguration-usage:
47
44
0 commit comments