Skip to content

Commit 6472f07

Browse files
committed
use list tables instead of table.yaml
1 parent 4641165 commit 6472f07

File tree

2 files changed

+61
-53
lines changed

2 files changed

+61
-53
lines changed

source/faq/concurrency.txt

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,67 @@ Which operations lock the database?
117117
The following table lists common database operations and the types of
118118
locks they use:
119119

120-
.. include:: /includes/table/lock-behavior-per-operation.rst
120+
.. list-table::
121+
:header-rows: 1
122+
123+
* - Operation
124+
125+
- Lock Type
126+
127+
* - Issue a query
128+
129+
- Read lock
130+
131+
* - Get more data from a :term:`cursor`
132+
133+
- Read lock
134+
135+
* - Insert data
136+
137+
- Write lock
138+
139+
* - Remove data
140+
141+
- Write lock
142+
143+
* - Update data
144+
145+
- Write lock
146+
147+
* - :term:`Map-reduce <map-reduce>`
148+
149+
- Read lock and write lock, unless operations are specified as
150+
non-atomic. Portions of map-reduce jobs can run concurrently.
151+
152+
153+
* - Create an index
154+
155+
- Building an index in the foreground, which is the default, locks
156+
the database for extended periods of time.
157+
158+
159+
* - :method:`db.eval()`
160+
161+
- Write lock. The :method:`db.eval()` method takes a global write
162+
lock while evaluating the JavaScript function.
163+
To avoid taking this global write lock, you can
164+
use the :dbcommand:`eval` command with ``nolock: true``.
165+
166+
167+
* - :dbcommand:`eval`
168+
169+
- Write lock. By default, :dbcommand:`eval` command takes a global
170+
write lock while evaluating the JavaScript function. If used
171+
with ``nolock: true``, the :dbcommand:`eval`
172+
command does *not* take a global write lock while evaluating
173+
the JavaScript function. However, the logic within the
174+
JavaScript function may take write locks for write operations.
175+
176+
177+
* - :method:`~db.collection.aggregate()`
178+
179+
- Read lock
180+
121181

122182
Which administrative commands lock the database?
123183
------------------------------------------------

source/includes/table-lock-behavior-per-operation.yaml

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

0 commit comments

Comments
 (0)