Skip to content

Commit 673c95f

Browse files
author
Sam Kleinman
committed
DOCS-711 specified corrections
1 parent 40ffeb4 commit 673c95f

16 files changed

+108
-59
lines changed

source/includes/warning-blocking-database.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

source/reference/command/clean.txt

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

99
:dbcommand:`clean` is an internal command.
10-
11-
.. include:: /includes/warning-blocking-database.rst
10+
11+
.. warning::
12+
13+
This command obtains a write lock on the affected database and will
14+
block other operations until it has completed.
1215

1316
.. write-lock, slave-ok

source/reference/command/clone.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434

3535
See :dbcommand:`copydb` for similar functionality.
3636

37-
.. include:: /includes/warning-blocking-database.rst
37+
.. warning::
38+
39+
This command obtains an intermittent write-lock on the
40+
destination server, that can block other operations until it
41+
completes.
3842

3943
.. intermittent write-lock on destination server.

source/reference/command/collMod.txt

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,23 @@ collMod
3131
collection. By setting :collflag:`usePowerOf2Sizes`, you ensure
3232
that MongoDB will allocate space for documents in sizes that
3333
are powers of 2 (e.g. 4, 8, 16, 32, 64, 128, 256, 512...8388608).
34-
With this option MongoDB will be able to more effectively reuse
35-
space.
36-
34+
With this option MongoDB will be able to more effectively reuse
35+
space.
36+
3737
:collflag:`usePowerOf2Sizes` is useful for collections where you
3838
will be inserting and deleting large numbers of documents to
3939
ensure that MongoDB will effectively use space on disk.
40-
41-
.. note::
42-
43-
In |release|, the :collflag:`usePowerOf2Sizes` is
44-
subject to a limitation where MongoDB ineffectively reuses
45-
spaces larger than 8 megabytes. See, :issue:`SERVER-7238` for
46-
more information.
47-
48-
.. include:: /includes/warning-blocking-database.rst
49-
40+
41+
.. note::
42+
.. versionchanged:: 2.2.1
43+
If you're using :collflag:`usePowerOf2Sizes`, ensure
44+
you use at least 2.2.1 to avoid the issue described in
45+
:issue:`SERVER-7238`.
46+
47+
:collflag:`usePowerOf2Sizes` only affects subsequent
48+
allocations cased by document insertion or record relocation
49+
as a result of document growth, and *does not* affect
50+
existing allocations.
51+
52+
This command obtains a write lock on the affected database
53+
and will block other operations until it has completed.

source/reference/command/copydbgetnonce.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ 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-database.rst
11+
12+
.. note::
13+
14+
This command obtains a write lock on the affected database and
15+
will block other operations until it has completed; however, the
16+
write lock for this operation is short lived.
1317

1418
.. write-lock, admin-only

source/reference/command/create.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,9 @@ create
4242
The :method:`db.createCollection()` provides a wrapper function that
4343
provides access to this functionality.
4444

45-
.. include:: /includes/warning-blocking-database.rst
45+
.. note::
46+
47+
This command obtains a write lock on the affected database and
48+
will block other operations until it has completed. The write
49+
lock for this operation is typically short lived; however,
50+
allocations for large capped collections may take longer.

source/reference/command/diagLogging.txt

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

99
:dbcommand:`diagLogging` is an internal command.
10-
11-
.. include:: /includes/warning-blocking-database.rst
10+
11+
.. warning::
12+
13+
This command obtains a write lock on the affected database and
14+
will block other operations until it has completed.
1215

1316
.. write-lock, slave-ok,

source/reference/command/drop.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ drop
2323
Note that this command also removes any indexes associated with the
2424
dropped collection.
2525

26-
.. include:: /includes/warning-blocking-database.rst
26+
.. warning::
27+
28+
This command obtains a write lock on the affected database and
29+
will block other operations until it has completed.

source/reference/command/dropIndexes.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dropIndexes
66

77
.. dbcommand:: dropIndexes
88

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

@@ -28,4 +28,7 @@ dropIndexes
2828

2929
db.collection.dropIndex("age_1");
3030

31-
.. include:: /includes/warning-blocking-database.rst
31+
.. warning::
32+
33+
This command obtains a write lock on the affected database and
34+
will block other operations until it has completed.

source/reference/command/emptyCapped.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ emptycapped
1616
This command removes all records from the capped collection named
1717
``events``.
1818

19-
.. include:: /includes/warning-blocking-database.rst
19+
.. warning::
20+
21+
This command obtains a write lock on the affected database and
22+
will block other operations until it has completed.

source/reference/command/findAndModify.txt

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ findAndModify
1010
returns a single document. By default, the returned document does
1111
not include the modifications made on the update. To return the
1212
document with the modifications made on the update, use the ``new``
13-
option.
13+
option.
1414

1515
The command has the following syntax:
1616

@@ -22,42 +22,42 @@ findAndModify
2222
sub-document ``options``:
2323

2424
:field document query:
25-
25+
2626
Optional. Specifies the selection criteria for the
2727
modification. The ``query`` field employs the same
2828
:ref:`query selectors <query-selectors>` as used in the
2929
:method:`db.collection.find()` method. Although the query may
3030
match multiple documents, :dbcommand:`findAndModify` will
3131
only select one document to modify.
32-
32+
3333
The ``query`` field has the following syntax:
34-
34+
3535
.. code-block:: javascript
36-
36+
3737
query: { <query expression> }
38-
39-
:field document sort:
38+
39+
:field document sort:
4040

4141
Optional. Determines which document the operation will
4242
modify if the query selects multiple
4343
documents. :dbcommand:`findAndModify` will modify the first
4444
document in the sort order specified by this argument.
4545

4646
The ``sort`` field has the following syntax:
47-
47+
4848
.. code-block:: javascript
49-
49+
5050
sort: { field1: value1, field2: value2, ... }
5151

5252
:field boolean remove:
5353

5454
Optional if ``update`` field exists. When ``true``, removes
5555
the selected document. The default is ``false``.
56-
56+
5757
The ``remove`` field has the following syntax:
58-
58+
5959
.. code-block:: javascript
60-
60+
6161
remove: <boolean>
6262

6363
:field document update:
@@ -82,16 +82,16 @@ findAndModify
8282

8383
new: <boolean>
8484

85-
:field document fields:
86-
85+
:field document fields:
86+
8787
Optional. A subset of fields to return.
88-
88+
8989
.. code-block:: javascript
9090

9191
fields: { field1: <boolean>, field2: <boolean> ... }
9292

93-
:field boolean upsert:
94-
93+
:field boolean upsert:
94+
9595
Optional. Used in conjunction with the ``update`` field. When
9696
``true``, the :dbcommand:`findAndModify` command creates a
9797
new document if the ``query`` returns no documents. The
@@ -119,17 +119,17 @@ findAndModify
119119
}
120120

121121
This command performs the following actions:
122-
122+
123123
#. The ``query`` finds a document in the ``people`` collection where the
124124
``name`` field has the value ``Tom``, the ``state`` field has the
125125
value ``active`` and the ``rating`` field has a value
126126
:operator:`greater than <$gt>` 10.
127-
127+
128128
#. The ``sort`` orders the results of the query in ascending order.
129-
129+
130130
#. The update :operator:`increments <$inc>` the value of the
131131
``score`` field by 1.
132-
132+
133133
#. The command returns the original unmodified document
134134
selected for this update.
135135

@@ -154,4 +154,9 @@ findAndModify
154154
:program:`mongos` instances for non-sharded collections function
155155
normally.
156156

157-
.. include:: /includes/warning-blocking-database.rst
157+
.. note::
158+
159+
This command obtains a write lock on the affected database and
160+
will block other operations until it has completed; however,
161+
typically the write lock is short lived and equivelent to other
162+
similar :method:`update() <db.collection.update()>` operations.

source/reference/command/godinsert.txt

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

99
:dbcommand:`godinsert` is an internal command for testing purposes only.
10-
11-
.. include:: /includes/warning-blocking-database.rst
10+
11+
.. note::
12+
13+
This command obtains a write lock on the affected database and will
14+
block other operations until it has completed.
1215

1316
.. write-lock, slave-ok

source/reference/command/profile.txt

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

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

55+
.. note::
56+
57+
This command obtains a write lock on the affected database and will
58+
block other operations until it has completed; however the write
59+
lock is only in place while the enabling and disabling the
60+
profiler, which is typically a short operation.

source/reference/command/reIndex.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ reIndex
2727

2828
db.collection.reIndex();
2929

30-
.. include:: /includes/warning-blocking-database.rst
30+
.. warning::
31+
32+
This command obtains a write lock on the affected database and
33+
will block other operations until it has completed.

source/reference/command/recvChunkStart.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ recvChunkStart (internal)
99
:dbcommand:`_recvChunkStart` is an internal command. Do not call
1010
directly.
1111

12-
.. include:: /includes/warning-blocking-database.rst
12+
.. warning::
13+
14+
This command obtains a write lock on the affected database and
15+
will block other operations until it has completed.
1316

1417
.. admin-only, write-lock

source/reference/command/shardingState.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ shardingState
1414

1515
{ shardingState: 1 }
1616

17-
.. include:: /includes/warning-blocking-database.rst
17+
.. warning::
18+
19+
This command obtains a write lock on the affected database and
20+
will block other operations until it has completed; however, the
21+
operation is typically short lived.
1822

1923
.. admin-only

0 commit comments

Comments
 (0)