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

Collection _ns should be protected from concurrent operations

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Query 2018-11-19
    • 10

      Renames in the same database no longer swap Collection pointers in the UUIDCatalog. As soon as the rename sets a new NamespaceString on the collection, the entry in the UUID catalog changes, without having to take the UUIDCatlalog mutex. So even though the catalog is protected by a mutex, the _ns field on the Collection is not.

      This means a lookup by UUID concurrent with a rename with a can potentially read the memory of a previous NamespaceString that has freed its underlying string.

      The _ns field should be protected by a mutex for thread-safe read operations.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: