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

FLE2 unsharded compaction may deadlock if a setFCV occurs concurrently

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Security 2023-04-03, Security 2023-04-17

    Description

      If a setFCV command is issued while a FLE 2 compaction (unsharded) operation has transactions running, the FCV op observer will abort those transactions, and cause them to be retried. The FCV command then waits until it can acquire the FCV lock in S mode. At this point the FCV command is blocked, because the compact command is still holding onto a DBLock (and the global lock) in IX mode here.

      Meanwhile, the The retry transaction step will issue a "best effort abort" on the cancelled transaction, which entails issuing an abortTransaction command (see here). The invocation of this command ultimately tries to acquire the global lock on IX mode as well, so it also blocks. This lock acquisition happens here.

      Attachments

        Activity

          People

            erwin.pe@mongodb.com Erwin Pe
            erwin.pe@mongodb.com Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: