Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4254

maxTimeMs is ignored in explain tab

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Compass, Explain
    • Labels:
      None

      the maxTimeMs option seems to be ignored in the explain tab.

      NOTE: that may be by intentional. It seems that maxTimeMs is also ignored by cursor.explain in node.js. I tried await coll.find().maxTimeMs(1).skip(2700).limit(5000).batchSize(1).explain() and it just returns, whereas toArray fails with a timeout.

      To reproduce: Set maxTimeMs to 1 ms and run an explain for a non-indexed query on a big collection.

      Even if few stages would report an execution time that is bigger than the maxTimeMs no error is raised and the operation returns normally.

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: