翻译或纠错本页面

writeBacksQueued

writeBacksQueued

writeBacksQueued is an internal command that returns a document reporting there are operations in the write back queue for the given mongos and information about the queues.

writeBacksQueued.hasOpsQueued

Boolean.

hasOpsQueued is true if there are write Back operations queued.

writeBacksQueued.totalOpsQueued

Integer.

totalOpsQueued reflects the number of operations queued.

writeBacksQueued.queues

Document.

queues holds an embedded document where the fields are all write back queues. These field hold a document with two fields that reports on the state of the queue. The fields in these documents are:

writeBacksQueued.queues.n

n reflects the size, by number of items, in the queues.

writeBacksQueued.queues.minutesSinceLastCall

The number of minutes since the last time the mongos touched this queue.

The command document has the following prototype form:

{writeBacksQueued: 1}

To call writeBacksQueued from the mongo shell, use the following db.runCommand() form:

db.runCommand({writeBacksQueued: 1})

Consider the following example output:

{
  "hasOpsQueued" : true,
  "totalOpsQueued" : 7,
  "queues" : {
          "50b4f09f6671b11ff1944089" : { "n" : 0, "minutesSinceLastCall" : 1 },
          "50b4f09fc332bf1c5aeaaf59" : { "n" : 0, "minutesSinceLastCall" : 0 },
          "50b4f09f6671b1d51df98cb6" : { "n" : 0, "minutesSinceLastCall" : 0 },
          "50b4f0c67ccf1e5c6effb72e" : { "n" : 0, "minutesSinceLastCall" : 0 },
          "50b4faf12319f193cfdec0d1" : { "n" : 0, "minutesSinceLastCall" : 4 },
          "50b4f013d2c1f8d62453017e" : { "n" : 0, "minutesSinceLastCall" : 0 },
          "50b4f0f12319f193cfdec0d1" : { "n" : 0, "minutesSinceLastCall" : 1 }
  },
  "ok" : 1
}