-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
rs.remove.txt
52 lines (32 loc) · 1.04 KB
/
rs.remove.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
===========
rs.remove()
===========
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Definition
----------
.. method:: rs.remove(hostname)
Removes the member described by the ``hostname`` parameter from the
current :term:`replica set`. This function will disconnect the
shell briefly and forces a reconnection as the :term:`replica set`
renegotiates which member will be :term:`primary`. As a
result, the shell will display an error even if this command
succeeds.
The :method:`rs.remove()` method has the following parameter:
.. list-table::
:header-rows: 1
:widths: 20 20 80
* - Parameter
- Type
- Description
* - ``hostname``
- string
- The hostname of a system in the replica set.
.. note::
Before running the :method:`rs.remove()` operation, it is good
practice to *shut down* the replica set member that you are
removing.