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

Review locking invariants in CollectionCatalog

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • 2
    • 2

      Recently we discovered that there are parts of the codebase that are using the CollectionCatalog without acquiring any locks as part of the operation.

      This can lead to invalid results being returned if the Catalog is accessed during Rollback and/or Shutdown. In both of those states the catalog gets reset to an empty map so all lookups will fail. If an operation accesses the catalog at that point, the results won't be valid.

      As part of this ticket we should consider updating the comments in the catalog to reflect the necessity of holding the global lock and adding invariants that check that the lock is held. This should prevent new invalid uses of the class.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: