[SERVER-9738] mongos should set the CursorNotFound bit when the cursor is not found Created: 21/May/13 Updated: 11/Jul/16 Resolved: 08/Jul/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 2.4.7, 2.5.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
MongoDB Status as of October 9th, 2013 ISSUE SUMMARY USER IMPACT SOLUTION WORKAROUNDS PATCHES Original DescriptionInstead, it sets the QueryFailure bit. See http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply. Drivers typically have different exception types for these two bits, so end up throwing a different exception when running against a shard cluster. |
| Comments |
| Comment by auto [ 02/Oct/13 ] | |||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Lower invalid cursor log level from 6 to 3. | |||||||||
| Comment by auto [ 02/Oct/13 ] | |||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: | |||||||||
| Comment by Randolph Tan [ 08/Jul/13 ] | |||||||||
|
Note to drivers: Mongos now doesn't reply with a BSON document with the $err field if cursor is not found for unsharded collections. It is now consistent with the behavior with sharded collections and stand alone mongod - the cursor not found flag is set with no document in the response. | |||||||||
| Comment by auto [ 08/Jul/13 ] | |||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Lower invalid cursor log level from 6 to 3. | |||||||||
| Comment by auto [ 08/Jul/13 ] | |||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: | |||||||||
| Comment by Randolph Tan [ 27/Jun/13 ] | |||||||||
|
The docs for CursorNotFound says: Set when getMore is called but the cursor id is not valid at the server. Returned with zero results. So I think the mongod works as designed (no $err document). | |||||||||
| Comment by Derick Rethans [ 22/May/13 ] | |||||||||
|
I'm actually seeing another difference between talking to MongoS and MongoD. With MongoD, if we try to read from a killed/closed cursor, I am seeing this:
With MongoS, I see:
mongosniff however doesn't show the flags, but from checking in the code:
It'd be helpful of MongoD also added the $err document just like MongoS now does (but with the wrong flag). |