Skip to content

Commit daa833c

Browse files
author
Sam Kleinman
committed
DOCS-2381: edits to steps file
1 parent dedadd3 commit daa833c

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
title: Copy the replica set configuration to a variable.
22
stepnum: 1
33
ref: copy-configration-object
4+
pre: |
5+
In the :program:`mongo` shell, use :method:`rs.conf()` to retrieve
6+
the replica set configuration and assign it to a variable. For
7+
example:
48
action:
5-
- pre: |
6-
In the :program:`mongo` shell,
7-
use :method:`rs.conf()` to retrieve the replica set configuration and
8-
assign it to a variable. For example:
9-
language: javascript
10-
code: |
11-
cfg = rs.conf()
9+
language: javascript
10+
code: |
11+
cfg = rs.conf()
1212
---
1313
title: Change each member's priority value.
1414
stepnum: 2
1515
ref: change-priority-values
16+
pre: |
17+
Change each member's :data:`~local.system.replset.members[n].priority`
18+
value, as configured in the :data:`~local.system.replset.members`
19+
array.
1620
action:
17-
- pre: |
18-
Change each
19-
member's :data:`~local.system.replset.members[n].priority` value, as
20-
configured in the :data:`~local.system.replset.members`
21-
array.
21+
language: javascript
22+
code: |
23+
cfg.members[0].priority = 0.5
24+
cfg.members[1].priority = 2
25+
cfg.members[2].priority = 2
2226
post: |
23-
The following example uses the ``cfg`` variable to change the
24-
priority for the first three members configured in the array.
25-
language: javascript
26-
code: |
27-
cfg.members[0].priority = 0.5
28-
cfg.members[1].priority = 2
29-
cfg.members[2].priority = 2
27+
This sequence of operations modifies the value of ``cfg`` to set the
28+
priority for the first three members defined in the
29+
:data:`~local.system.replset.members` array.
3030
---
3131
title: Assign the replica set the new configuration.
3232
stepnum: 3
3333
ref: assign-new-config
34+
pre: |
35+
Use :method:`rs.reconfig()` to apply the new configuration.
3436
action:
35-
- pre: |
36-
Use :method:`rs.reconfig()` to apply the new configuration.
37+
language: javascript
38+
code: |
39+
rs.reconfig(cfg)
3740
post: |
38-
For example, to assign the replica set the new
39-
configuration in from the ``cfg`` variable, issue the following:
40-
language: javascript
41-
code: |
42-
rs.reconfig(cfg)
41+
This operation updates the configuration of the replica set using
42+
the configuration defined by the value of ``cfg``.
4343
...

0 commit comments

Comments
 (0)