Magic restore unnecessarily keeps a collection acquired

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0, 8.0.10
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • Repl 2025-02-17
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The code here keeps an AutoGetCollection acquired unnecessarily long:

      https://github.com/10gen/mongo/blob/ed405958353e2d940fd23e4488cc4af722f168c3/src/mongo/db/modules/enterprise/src/magic_restore/magic_restore.cpp#L715-L735

      We should ideally release the AutoGet as soon as possible to avoid having locks on two collections at the same time since it otherwise triggers a lock dependency inversion that SERVER-99150 detects (config -> admin database).

              Assignee:
              Ali Mir
              Reporter:
              Jordi Olivares Provencio
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: