Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36716

GlobalCursorIdCache::visitAllCursorManagers should not uassert on encountering a view

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query
    • 5

      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.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: