Skip to content

Commit 6639497

Browse files
committed
DOCS-11642: listCollection and IS lock
1 parent 04c9fba commit 6639497

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

source/faq/concurrency.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ use for document level locking storage engines:
225225

226226
* - List collections
227227

228-
- ``R`` (Shared)
228+
- ``r`` (Intent Shared)
229+
230+
.. versionchanged:: 4.0
229231

230232
-
231233

source/includes/apiargs-dbcommand-listCollections-field.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ description: |
2121
Returning just the name and type (``view`` or ``collection``) does
2222
not take collection-level locks whereas returning full collection
2323
information locks each collection in the database.
24+
2425
2526
The default value is ``false``.
2627

source/reference/command/listCollections.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Definition
2828

2929
.. code-block:: javascript
3030

31-
{ listCollections: 1, filter: <document> }
31+
{ listCollections: 1, filter: <document>, nameOnly: <boolean> }
3232

3333
The :dbcommand:`listCollections` command can take the following
3434
optional field:
@@ -45,6 +45,16 @@ can specify a ``filter`` on any of the :ref:`fields returned
4545
<list-collection-output>` in the :dbcommand:`listCollections` result
4646
set.
4747

48+
.. versionchanged:: 4.0
49+
50+
The :dbcommand:`listCollection` command takes Intent Shared lock on
51+
the database. Unless the ``nameOnly`` option is specified, the
52+
command also takes an Intent Shared lock on each of the collections
53+
in turn while holding the Intent Shared lock on the database.
54+
55+
In previous versions, the command takes Shared lock on
56+
the database.
57+
4858
.. _list-collection-output:
4959

5060
Output

source/release-notes/4.0.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ Aggregation
492492
Commands
493493
~~~~~~~~
494494

495+
- The command :dbcommand:`listCollections` takes Intent Shared lock on
496+
the database. In previous versions, the command takes Shared lock on
497+
the database.
498+
495499
- The command :dbcommand:`listCollections` and its :binary:`~bin.mongo`
496500
shell helper :method:`db.getCollectionInfos()` accepts the following
497501
option:
@@ -542,6 +546,8 @@ Miscellaneous
542546
created outside of a session, you cannot call :dbcommand:`getMore`
543547
inside a session.
544548

549+
=======
550+
>>>>>>> 8ef55794b... DOCS-11642: listCollection and IS lock
545551
Changes Affecting Compatibility
546552
-------------------------------
547553

0 commit comments

Comments
 (0)