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

[StorEx] Remove or document instances of UninterruptibleLockGuard

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2023-03-20, Execution Team 2023-05-15, Execution Team 2023-05-29

      SERVER-68868 intends to remove UninterruptipleLockGuard uses where possible, from its description:

      Uses of UninterruptibleLockGuard indicate places in the code that do not comply with MongoDB's requirement that all operations be interruptible at places where they block to wait for resources. Every one of them is a potential future deadlock, and adds complexity to other parts of the codebase. We should reimplement codepaths that depend on UninterruptibleLockGuard so as to be interruptible.

      The work has been split for the different teams in server, this one being for Storage Execution.

      SERVER-68867 introduced a linter rule to add friction when adding new UninterruptipleLockGuard instances, and commented existing ones with NOLINT, while also adding a TODO with the corresponding server team ticket if an instance was found to not have a comment explaining why its use is warranted.

      We should either add a comment justifying the use of UninterruptibleLockGuard or fix the code to remove its use.
      Search for "TODO (SERVER-71610)" in the code base:

      https://github.com/10gen/mongo/blob/34ac49477b87e183637f68cda828ecff8b393c64/src/mongo/db/repair.cpp#L173
      https://github.com/10gen/mongo/blob/34ac49477b87e183637f68cda828ecff8b393c64/src/mongo/db/catalog/drop_database.cpp#L192
      https://github.com/10gen/mongo/blob/34ac49477b87e183637f68cda828ecff8b393c64/src/mongo/db/catalog/drop_database.cpp#L309
      https://github.com/10gen/mongo/blob/34ac49477b87e183637f68cda828ecff8b393c64/src/mongo/db/catalog/multi_index_block.cpp#L1027
      https://github.com/10gen/mongo/blob/34ac49477b87e183637f68cda828ecff8b393c64/src/mongo/embedded/embedded.cpp#L169

            Assignee:
            yujin.kang@mongodb.com Yujin Kang Park
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: