[SERVER-26775] ClientCursorMonitor should not crash on view namespaces Created: 25/Oct/16  Updated: 19/Nov/16  Resolved: 15/Nov/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.4.0-rc4

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Daniel Gottlieb (Inactive)
Resolution: Done Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2016-10-31, Storage 2016-11-21
Participants:
Linked BF Score: 0

 Description   

The ClientCursorMonitor periodically calls CursorManager::timeoutCursorsGlobal(), which will go over all open cursors and attempt to time them out. This code doesn't correctly handle views, and encounters an exception because it tries to get collection locks for a view's namespace.



 Comments   
Comment by Githook User [ 15/Nov/16 ]

Author:

{u'username': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}

Message: SERVER-26775: Cursors may be on a view namespace.

When a ClientCursorMonitor is timing out a cursor, its namespace may
be on a view. One case where this can happen is when the cursor was
on a collection, but when the ClientCursorMonitor gets to timing it
out, that collection was dropped and its namespace was recreated as
a view.
Branch: master
https://github.com/mongodb/mongo/commit/549c3f4315fd95431a662e7a8eff880f00b1458d

Comment by Charlie Swanson [ 25/Oct/16 ]

Actually, after some more investigation, it looks like my initial diagnosis was incorrect. Creating a view does not create a CursorManager, so we must be in some sort of weird state where there is a CursorManager registered on a namespace, but that namespace is actually a view. I'll do some more investigation tomorrow.

Generated at Thu Feb 08 04:13:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.