Retrying setAllowMigrations command may end up in a deadlock

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-06-26, Sharding EMEA 2023-07-10
    • 140
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Retrying the setAllowMigrations command with a session and a txnNum (retryableWrite:true) may end up with a deadlock, competing for a session checkout and the _kChunkOpLock acquisition, as it's shown below:

       

      First cmd: session checkout > lock _kChunkOpLock > session check-in > transaction happenssession checkout > unlock _kChunkOpLock
      Second cmd: session checkout > lock _kChunkOpLock > session check-in > transaction happens > session checkout > unlock _kChunkOpLock

              Assignee:
              Marcos José Grillo Ramirez
              Reporter:
              Silvia Surroca
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: