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

Collection _ns should be protected from concurrent operations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.6
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Query 2018-11-19
    • Linked BF Score:
      10

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: