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

GlobalCursorIdCache::visitAllCursorManagers should not uassert on encountering a view

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-query Backlog - Query Team
            Reporter:
            james.wahlin James Wahlin
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: