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

Count with no results, never yields

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6.0-rc0
    • 2.6.0-rc3
    • Internal Code, Querying
    • None

    Description

      This commit causes a regression such that no yielding will happen if the policy isn't set due to never entering the loop, which enables the auto-yielding policy. This can also be seen in more complicated scenarios where the timer has yet to trigger the policy and nothing is returned thus delaying the policy being set until a result is found (after the timer triggers), and then yielding will happen after that.

      The easiest way to see this is to run a count with a query which matches nothing, causing a collection scan.

      This also affects maxTimeMS timeouts, and trying to kill the op, since without the yielding checks the count cannot be terminated.

      https://github.com/mongodb/mongo/blob/2850cc7253344c639bc9a01bc6dff3ffd2cca422/src/mongo/db/ops/count.cpp#L98

      Attachments

        Issue Links

          Activity

            People

              hari.khalsa@10gen.com hari.khalsa@10gen.com
              scotthernandez Scott Hernandez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: