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

ReshardingCoordinatorService Index build deadlocks with OpObserver

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Sharding NYC
    • ALL
    • 157

    Description

      In its _rebuildService, the ReshardingCoordinator tries to build an index. Initialization of the service cannot complete until this index is built. In the related resharding OpObserver onUpdate, we wait for the service to complete initialization, while holding an IX lock. Two-phase indexes require an S lock to complete, so that can result in deadlock if the collection is not empty when the index is built.

      This is extremely rare or can't happen under normal circumstances in 7.0 (because either the index exists already or the collection is empty), but if a later revision removes the index, downgrade can deadlock the service.

      Attachments

        Activity

          People

            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: