Stop taking DSS and CSS locks on assertNoMovePrimaryInProgress

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Some implementations of assertNoMovePrimaryInProgress take a DSS lock and then a CSS lock. This is prone to deadlocks because there are other places where we take the CSS lock and then the DSS lock, mainly due to the ShardingWriteRouter and opObservers.

      We don't need to hold both locks at the same time, since the stability for whether there's an in progress movePrimary or not is given by the DB lock, not the DSS lock.

            Assignee:
            Daniel Gomez Ferro
            Reporter:
            Daniel Gomez Ferro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: