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

Fix lock ordering in CommonMongodProcessInterface::fieldsHaveSupportingUniqueIndex

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2024-09-30

      The method currently attempts to lock the collection in order to gather some information about it.

      If the operation is performing a lock-free read this has the effect of flipping the lock ordering of the global and RSTL locks which could potentially cause a deadlock to be encountered one day. That is because we expect to lock first the RSTL followed by the Global lock, but in this case we would've locked the Global lock first before doing the RSTL.

            Assignee:
            mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: