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.
- is depended on by
-
SERVER-5570 Killing of 'count' query cause incorrect behavior
- Closed
-
SERVER-2222 notablescan mode neglects to fail some table scan queries
- Backlog
- related to
-
SERVER-3678 Interrupted count query returns 0 as count result
- Closed