count command returns zero in some error cases rather than reporting an error with ok:false

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1.2
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      if ( !res->complete() )

      { log() << "Count with ns: " << ns << " and query: " << query << " failed with exception: " << res->exception() << endl; return 0; }

      If none of the query plans were successful, runCount() returns a count of zero and this is forwarded by the count command implementation. This may be very old behavior predating the current query optimizer so if we change this it might be prudent to do so carefully.

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: