Skip to content

Commit 6e97ac9

Browse files
author
Ed Costello
committed
DOCS-533 add notes/warnings to commands which block db / server
1 parent 67ee40d commit 6e97ac9

21 files changed

+56
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. warning::
2+
3+
This command obtains a write lock on the affected collection
4+
and will block other operations until it has completed.
5+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. warning::
2+
3+
This command obtains a write lock on the affected database
4+
and will block other operations until it has completed.
5+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. warning::
2+
3+
This command obtains a global write lock and will block other
4+
operations until it has completed.
5+

source/reference/command/clean.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ clean (internal)
77
.. dbcommand:: clean
88

99
:dbcommand:`clean` is an internal command.
10+
11+
.. include:: /includes/warning-blocking-database.rst
1012

1113
.. write-lock, slave-ok

source/reference/command/clone.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ clone
3333
allow other operations to complete.
3434

3535
See :dbcommand:`copydb` for similar functionality.
36+
37+
.. include:: /includes/warning-blocking-database.rst
38+
39+
.. TODO: does obtain WRITE lock, does this affect solely origination server?

source/reference/command/closeAllDatabases.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ closeAllDatabases (internal)
99
:dbcommand:`closeAllDatabases` is an internal command that
1010
invalidates all cursors and closes the open database files. The
1111
next operation that uses the database will reopen the file.
12+
13+
.. include:: /includes/warning-blocking-global.rst

source/reference/command/collMod.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ collMod
3636
:collflag:`usePowerOf2Sizes` is useful for collections where you
3737
will be inserting and deleting large numbers of documents to
3838
ensure that MongoDB will effectively use space on disk.
39+
40+
.. include:: /includes/warning-blocking-database.rst

source/reference/command/convertToCapped.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ convertToCapped
2525
the original collection on the new collection. If you need
2626
indexes on this collection you will need to create these indexes
2727
after the conversion is complete.
28+
29+
.. include:: /includes/warning-blocking-operation.rst

source/reference/command/copydbgetnonce.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ copydbgetnonce (internal)
88

99
Client libraries use :dbcommand:`copydbgetnonce` to get a one-time
1010
password for use with the :dbcommand:`copydb` command.
11+
12+
.. include:: /includes/warning-blocking-operation.rst
1113

1214
.. write-lock, admin-only

source/reference/command/create.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ create
4141

4242
The :method:`db.createCollection()` provides a wrapper function that
4343
provides access to this functionality.
44+
45+
.. include:: /includes/warning-blocking-database.rst

source/reference/command/diagLogging.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ diagLogging (internal)
77
.. dbcommand:: diagLogging
88

99
:dbcommand:`diagLogging` is an internal command.
10+
11+
.. include:: /includes/warning-blocking-database.rst
1012

1113
.. write-lock, slave-ok,

source/reference/command/drop.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ drop
2222

2323
Note that this command also removes any indexes associated with the
2424
dropped collection.
25+
26+
.. include:: /includes/warning-blocking-database.rst

source/reference/command/dropDatabase.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ dropDatabase
2424

2525
db.dropDatabase();
2626

27+
.. include:: /includes/warning-blocking-global.rst
28+
2729
.. write-lock

source/reference/command/dropIndexes.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ dropIndexes
66

77
.. dbcommand:: dropIndexes
88

9-
The :dbcommand:`dropIndexes` command drops one or all indexes from the current collection.
9+
The :dbcommand:`dropIndexes` command drops one or all indexes from
10+
the current collection.
1011
To drop all indexes, issue the command like so:
1112

1213
.. code-block:: javascript
@@ -26,3 +27,5 @@ dropIndexes
2627
.. code-block:: javascript
2728

2829
db.collection.dropIndex("age_1");
30+
31+
.. include:: /includes/warning-blocking-database.rst

source/reference/command/godinsert.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ godinsert (internal)
77
.. dbcommand:: godinsert
88

99
:dbcommand:`godinsert` is an internal command for testing purposes only.
10+
11+
.. include:: /includes/warning-blocking-operation.rst
1012

1113
.. write-lock, slave-ok

source/reference/command/handshake.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ handshake (internal)
88

99
:dbcommand:`handshake` is an internal command.
1010

11-
.. slave-ok
11+
.. slave-ok, no-lock

source/reference/command/profile.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ profile
5151
shell.
5252

5353
.. include:: /includes/note-disable-profiling-fsynclock.rst
54+
55+
.. include:: /includes/warning-blocking-database.rst
56+

source/reference/command/recvChunkStart.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ recvChunkStart (internal)
88

99
:dbcommand:`_recvChunkStart` is an internal command. Do not call
1010
directly.
11+
12+
.. include:: /includes/warning-blocking-operation.rst
1113

1214
.. admin-only, write-lock

source/reference/command/repairDatabase.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ repairDatabase
4040
line and use the :option:`--repairpath <mongod --repairpath>`
4141
switch to specify the folder in which to store the temporary repair
4242
files.
43+
44+
.. include:: /includes/warning-blocking-global.rst
4345

4446
This command is accessible via a number of different avenues. You
4547
may:

source/reference/command/resync.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ resync
1010
:program:`mongod` instance to re-synchronize itself. Note
1111
that this command is relevant to master-slave replication only. It does
1212
no apply to replica sets.
13+
14+
.. include:: /includes/warning-blocking-operation.rst
1315

1416
.. write-lock, slave-ok, admin-only.

source/reference/command/sleep.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sleep (internal)
77
.. dbcommand:: sleep
88

99
:dbcommand:`sleep` is an internal command for testing purposes. The
10-
:dbcommand:`sleep` command forces the db block all operations. It
10+
:dbcommand:`sleep` command forces the database to block all operations. It
1111
takes the following options:
1212

1313
.. code-block:: javascript
@@ -19,3 +19,5 @@ sleep (internal)
1919
seconds. Without arguments, :dbcommand:`sleep`, causes a "read
2020
lock" for 100 seconds.
2121

22+
.. include:: /includes/warning-blocking-operation.rst
23+

0 commit comments

Comments
 (0)