-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
None
-
Environment:RH6.3, mongod, 2.2.3, java driver 2.7/2.10 going through mongos
-
ALL
-
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/
- duplicates
-
SERVER-3964 Dropping an index invalidates all cursors on that collection, not just ones using that index.
- Closed