Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
1.8.2
-
None
-
Linux nb-lkoopmann 2.6.35-30-generic #56-Ubuntu SMP Mon Jul 11 20:01:08 UTC 2011 x86_64 GNU/Linux
-
ALL
Description
When interrupting a count query (for example in the mongo shell with killOp()) there is no exception raised but 0 returned as the count result. The count query should also raise an exception instead of returning 0, what might be interpreted as a valid result.
I performed these queries in the mongo shell and killed them in another shell - You can see the difference between all
three types of queries:
> db.messages.distinct({foo : "bar"})
|
Tue Aug 23 18:51:00 uncaught exception: distinct failed: { "errmsg" : "exception: interrupted", "code" : 11601, "ok" : 0 }
|
> db.messages.find({foo : "bar"})
|
error: { "$err" : "interrupted", "code" : 11601 }
|
> db.messages.count({foo : "bar"})
|
0
|
Attachments
Issue Links
- duplicates
-
SERVER-5570 Killing of 'count' query cause incorrect behavior
-
- Closed
-
- is related to
-
SERVER-2291 count command returns zero in some error cases rather than reporting an error with ok:false
-
- Closed
-