Skip to content

Docs 533 renamedatabase blocks #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 217 additions & 0 deletions draft/commands-locks.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions source/includes/warning-blocking-collection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. warning::

This command obtains a write lock on the affected collection
and will block other operations until it has completed.

5 changes: 5 additions & 0 deletions source/includes/warning-blocking-database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. warning::

This command obtains a write lock on the affected database
and will block other operations until it has completed.

5 changes: 5 additions & 0 deletions source/includes/warning-blocking-global.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. warning::

This command obtains a global write lock and will block other
operations until it has completed.

2 changes: 2 additions & 0 deletions source/reference/command/applyOps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ applyOps (internal)
corresponding expected result in the ``res`` field that must match
in order to apply the oplog entry.

.. include:: /includes/warning-blocking-global.rst

.. write-lock

.. see: DOCS-133; SERVER-4259
2 changes: 2 additions & 0 deletions source/reference/command/clean.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ clean (internal)
.. dbcommand:: clean

:dbcommand:`clean` is an internal command.

.. include:: /includes/warning-blocking-database.rst

.. write-lock, slave-ok
4 changes: 4 additions & 0 deletions source/reference/command/clone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ clone
allow other operations to complete.

See :dbcommand:`copydb` for similar functionality.

.. include:: /includes/warning-blocking-database.rst

.. TODO: does obtain WRITE lock, does this affect solely origination server?
2 changes: 2 additions & 0 deletions source/reference/command/closeAllDatabases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ closeAllDatabases (internal)
:dbcommand:`closeAllDatabases` is an internal command that
invalidates all cursors and closes the open database files. The
next operation that uses the database will reopen the file.

.. include:: /includes/warning-blocking-global.rst
2 changes: 2 additions & 0 deletions source/reference/command/collMod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ collMod
:collflag:`usePowerOf2Sizes` is useful for collections where you
will be inserting and deleting large numbers of documents to
ensure that MongoDB will effectively use space on disk.

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/collStats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ collStats
produce unpredictable and unexpected results in some situations.

.. seealso:: ":doc:`/reference/collection-statistics`."

.. READ lock
2 changes: 2 additions & 0 deletions source/reference/command/convertToCapped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ convertToCapped
the original collection on the new collection. If you need
indexes on this collection you will need to create these indexes
after the conversion is complete.

.. include:: /includes/warning-blocking-global.rst
2 changes: 2 additions & 0 deletions source/reference/command/copydbgetnonce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ copydbgetnonce (internal)

Client libraries use :dbcommand:`copydbgetnonce` to get a one-time
password for use with the :dbcommand:`copydb` command.

.. include:: /includes/warning-blocking-database.rst

.. write-lock, admin-only
2 changes: 2 additions & 0 deletions source/reference/command/create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ create

The :method:`db.createCollection()` provides a wrapper function that
provides access to this functionality.

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/dataSize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dataSize

The amount of time required to return :dbcommand:`dataSize` depends on the
amount of data in the collection.

.. read-lock
2 changes: 2 additions & 0 deletions source/reference/command/dbStats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ dbStats
a wrapper around this functionality. See the
":doc:`/reference/database-statistics`" document for an overview of
this output.

.. read-lock
2 changes: 2 additions & 0 deletions source/reference/command/diagLogging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ diagLogging (internal)
.. dbcommand:: diagLogging

:dbcommand:`diagLogging` is an internal command.

.. include:: /includes/warning-blocking-database.rst

.. write-lock, slave-ok,
2 changes: 2 additions & 0 deletions source/reference/command/drop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ drop

Note that this command also removes any indexes associated with the
dropped collection.

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/dropDatabase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ dropDatabase

db.dropDatabase();

.. include:: /includes/warning-blocking-global.rst

.. write-lock
5 changes: 4 additions & 1 deletion source/reference/command/dropIndexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ dropIndexes

.. dbcommand:: dropIndexes

The :dbcommand:`dropIndexes` command drops one or all indexes from the current collection.
The :dbcommand:`dropIndexes` command drops one or all indexes from
the current collection.
To drop all indexes, issue the command like so:

.. code-block:: javascript
Expand All @@ -26,3 +27,5 @@ dropIndexes
.. code-block:: javascript

db.collection.dropIndex("age_1");

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/emptyCapped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ emptycapped

This command removes all records from the capped collection named
``events``.

.. include:: /includes/warning-blocking-database.rst
1 change: 1 addition & 0 deletions source/reference/command/filemd5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ filemd5

{ filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), root: "fs" }

.. read-lock
2 changes: 2 additions & 0 deletions source/reference/command/findAndModify.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ findAndModify
cluster. :dbcommand:`findAndModify` operations issued against
:program:`mongos` instances for non-sharded collections function
normally.

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/godinsert.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ godinsert (internal)
.. dbcommand:: godinsert

:dbcommand:`godinsert` is an internal command for testing purposes only.

.. include:: /includes/warning-blocking-database.rst

.. write-lock, slave-ok
2 changes: 1 addition & 1 deletion source/reference/command/handshake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ handshake (internal)

:dbcommand:`handshake` is an internal command.

.. slave-ok
.. slave-ok, no-lock
3 changes: 3 additions & 0 deletions source/reference/command/profile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ profile
shell.

.. include:: /includes/note-disable-profiling-fsynclock.rst

.. include:: /includes/warning-blocking-database.rst

2 changes: 2 additions & 0 deletions source/reference/command/reIndex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ reIndex
.. code-block:: javascript

db.collection.reIndex();

.. include:: /includes/warning-blocking-database.rst
2 changes: 2 additions & 0 deletions source/reference/command/recvChunkStart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ recvChunkStart (internal)

:dbcommand:`_recvChunkStart` is an internal command. Do not call
directly.

.. include:: /includes/warning-blocking-database.rst

.. admin-only, write-lock
2 changes: 2 additions & 0 deletions source/reference/command/renameCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ renameCollection

.. warning:: You cannot use :dbcommand:`renameCollection` with
sharded collections.

.. include:: /includes/warning-blocking-global.rst
2 changes: 2 additions & 0 deletions source/reference/command/repairDatabase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ repairDatabase
line and use the :option:`--repairpath <mongod --repairpath>`
switch to specify the folder in which to store the temporary repair
files.

.. include:: /includes/warning-blocking-global.rst

This command is accessible via a number of different avenues. You
may:
Expand Down
7 changes: 7 additions & 0 deletions source/reference/command/replSetReconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,11 @@ replSetReconfig
the members of the replica set. When this happens, the set will
drop all current connections.


.. note::

The :dbcommand:`replSetReconfig` command will obtain a mutually
exclusive lock to prevent multiple replSetReconfig operations
from occurring at the same time.

.. slave-ok, admin-only
2 changes: 2 additions & 0 deletions source/reference/command/resync.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ resync
:program:`mongod` instance to re-synchronize itself. Note
that this command is relevant to master-slave replication only. It does
no apply to replica sets.

.. include:: /includes/warning-blocking-global.rst

.. write-lock, slave-ok, admin-only.
2 changes: 2 additions & 0 deletions source/reference/command/shardingState.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ shardingState

{ shardingState: 1 }

.. include:: /includes/warning-blocking-database.rst

.. admin-only
13 changes: 12 additions & 1 deletion source/reference/command/sleep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ sleep (internal)
.. dbcommand:: sleep

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

:param Boolean w: If true, obtain a global write lock.
:param integer secs: Specifies the number of seconds to sleep.

.. code-block:: javascript

Expand All @@ -19,3 +22,11 @@ sleep (internal)
seconds. Without arguments, :dbcommand:`sleep`, causes a "read
lock" for 100 seconds.

.. warning::

This command obtains a global read or write lock depending on
the options specified and will block other operations until
it has completed.


.. read-lock, write-lock, global-lock
2 changes: 2 additions & 0 deletions source/reference/command/top.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ top

You must issue the :dbcommand:`buildInfo` command against the
``admin`` database.

.. read-lock
2 changes: 2 additions & 0 deletions source/reference/command/validate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ validate
impact on the performance of your MongoDB instance.

.. TODO link to the document with these statistics

.. read-lock