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

Stop taking DSS and CSS locks on assertNoMovePrimaryInProgress

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

      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.gomezferro@mongodb.com Daniel Gomez Ferro
            Reporter:
            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: