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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • Sharding EMEA 2023-05-15
    • 110
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Pierlauro Sciarelli
            Reporter:
            Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: