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

Calling `setAllowMigrations` with a session while the balancer is enabled may result in deadlock

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • None
    • None
    • ALL
    • Sharding EMEA 2023-05-15
    • 110

    Description

      SERVER-73539 introduced replay protection when calling stopMigrations from the rename coordinator.

      The flow of setAllowMigrations is the following:

      1. Shard (DDL coordinator) asks the CSRS to stop migrations
      2. CSRS updates the collection's metadata and then asks every shard to:
        1. Abort current migrations
        2. Refresh the routing table

      Step (1) is performed with a session checked out and may get executed while a migration for one of the collections involved in the rename is happening on the same node the DDL coordinator runs on. In that case, the lsid will get propagated down until step (2.1) that will get stuck trying to checkout the same session.

      Attachments

        Activity

          People

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: