Skip to content

Docs 782 writebacksqueued #428

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
Nov 27, 2012
Merged
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
58 changes: 53 additions & 5 deletions source/reference/command/writeBacksQueued.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,59 @@ writeBacksQueued (internal)
===========================

.. default-domain:: mongodb

.. dbcommand:: writeBacksQueued

:dbcommand:`writeBacksQueued` is an internal command that returns true if
there are operations in the write back queue for the given :program:`mongos`.
This command applies to :term:`sharded clusters <sharded cluster>` only.
:dbcommand:`writeBacksQueued` is an internal command that returns
a document reporting there are operations in the write back queue
for the given :program:`mongos` and information about the queues.

:field Boolean hasOpsQueued:

True if there are writeBack operations queued.

:field integer totalOpsQueued:

The number of operations queued.

:field document queues:

A document listing the queues, with fields detailing the size of
each queue and the time since the last call.

:field document queues.n:

The size of the queue.

:field document queues.minutesSinceLastCall:

The minutes since the last call.

Examples
--------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

putting headings on this page will break the pages with all of the includes. because it'll include the whole file and randomly have an "examples" heading in the output.


.. code-block:: javascript

> db.runCommand({writeBacksQueued: 1})
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace is weird: tabs rather than three spaces?

I also prefer to avoid shell session copypasta. Report the output and the commands separately, rather than force people to parse shell scroll back.

"hasOpsQueued" : true,
"totalOpsQueued" : 7,
"queues" : {
"50a514204a0f431ff1944089" : { "n" : 0, "minutesSinceLastCall" : 1 },
"50a854a2c302ba1c5aeaaf59" : { "n" : 0, "minutesSinceLastCall" : 0 },
"50a854b65bbdacd51df98cb6" : { "n" : 0, "minutesSinceLastCall" : 0 },
"50a854c6ff03535c6effb72e" : { "n" : 0, "minutesSinceLastCall" : 0 },
"50a8553566232f70121071b3" : { "n" : 0, "minutesSinceLastCall" : 4 },
"50aa4711bd3c78d62453017e" : { "n" : 0, "minutesSinceLastCall" : 0 },
"50ac0df0293da708be675123" : { "n" : 0, "minutesSinceLastCall" : 1 }
},
"ok" : 1
}


.. slave-ok, admin-only

.. slave-ok, admin-only
.. The queue ids are BSON objectids, they correspond to the
mongos that has talked to this shard. This is derived from the
"serverID" field of the setShardVersion command the mongos
sends to the shard