[SERVER-36716] GlobalCursorIdCache::visitAllCursorManagers should not uassert on encountering a view Created: 17/Aug/18  Updated: 27/Oct/23  Resolved: 05/Feb/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: Backlog - Query Team (Inactive)
Resolution: Gone away Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Query
Participants:
Linked BF Score: 5

 Description   

When iterating over collection CursorManager instances we will:

  1. Build a list of namespaces from the CursorManager::_idToNss map under the CursorManager::_mutex.
  2. Release the CursorManager::_mutex and then iterate over the namespaces.
  3. MODE_IS lock each namespace using AutoGetCollection
  4. Under the lock, perform an operation on the collection's CursorManager.

It is possible that in between releasing CursorManager::_mutex and locking the collection namespace that a collection is dropped and recreated as a view. If this occurs, the call to AutoGetCollection will uassert when encountering the view. Instead we should change our collection locking mechanism to recognize that a namespace is now a view and skip the namespace, rather than uassert.



 Comments   
Comment by David Storch [ 05/Feb/19 ]

The changes in SERVER-39065 deleted the problematic code in GlobalCursorIdCache::visitAllCursorManagers(). Therefore, this issue no longer exists as of 5ee0b3805e. Closing as Gone Away.

Comment by Ian Whalen (Inactive) [ 13/Sep/18 ]

this should be reviewed prior to closing the related project to confirm it has gone away.

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