[SERVER-8975] Deleting non-existent indexes on a collection drops active (basic) cursors on that collection Created: 13/Mar/13 Updated: 10/Dec/14 Resolved: 13/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Alex Piggott | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RH6.3, mongod, 2.2.3, java driver 2.7/2.10 going through mongos |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Note that this does not occur if you use the console version of dropIndex(), only if you use the Java driver version. The difference can be seen in the log: Cursor version: ))' Java driver version: Presumably this is significant |
||||||||
| Participants: | |||||||||
| Description |
|
See https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/7lydgWPRmcI If when I have an active basic cursor, I delete an index on the same collection, then the cursor is dropped. (in my case it's a non-existent index, I don't know if dropping a real one would also fail) Furthermore, the DBCursor.hasNext()/DBCursor.next() from the java driver, instead of returning an error, returns what it claims is a valid DBObject but in fact is just { "$err" : "getMore: cursor didn't exist on server, possible restart or timeout?" , "code" : 13127}which imo is terrible error handling (I've seen similar issues with the Java driver before, eg DBCursor.count() returned 100 after timing out due to DB load on a much larger query) (If you want me to create a separate Java driver issue for the error handling then let me know) If it's intended behavior that index operations interfere with cursors (which it shouldn't be I think?) then at least you should update the documentation eg http://docs.mongodb.org/manual/core/read-operations/ |
| Comments |
| Comment by Aaron Staple [ 13/Mar/13 ] |
|
Hi Alex - I filed |
| Comment by Alex Piggott [ 13/Mar/13 ] |
|
Gah I really wish I'd found that issue 3 hours of my life ago |
| Comment by Aaron Staple [ 13/Mar/13 ] |
|
Hi Alex - I'm going to close this as a dup of |