Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31368

Log time spent waiting for other shards in merge cursors aggregation stage

    XMLWordPrintable

    Details

      Description

      Aggregation queries using $mergeCursors communicate with other shards and therefore can be affected by communication issues or issues on other nodes. In the following example the query ran for a very long time but did not spend any time acquiring locks and did not yield. Possibly it was waiting for a reponse from one or more of the other hosts, but there is no indication of that in the log message. It would be helpful for diagnosis if the slow query report indicated how much time was spent waiting for each host.

      2017-06-23T06:53:15.357+0200 I COMMAND  [conn44] command ... command: aggregate { aggregate: "...", pipeline: [ { $mergeCursors: [ { host: "...", ns: "...", id: 253733414549 }, ...]}, { $group: ... } keysExamined:0 docsExamined:0 numYields:0 nreturned:0 reslen:17527 locks:{ Global: { acquireCount: { r: 6 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_command 2909221ms
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                29 Vote for this issue
                Watchers:
                24 Start watching this issue

                Dates

                • Created:
                  Updated: