Prevent lock upgrade in ShardingRecoveryService::acquireRecoverableCriticalSectionBlockWrites when using config namespace

XMLWordPrintableJSON

    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-10-16
    • 1
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In ShardingRecoveryService::acquireRecoverableCriticalSectionBlockWrites we take a database IS lock and a collection S lock. Then later we may insert a document into the config.collection_critical_sections collection, which takes database and collection IX locks. Thus if the namespace originally passed into the function is in the config database, we'll end up upgrading our database lock from IS to IX.

              Assignee:
              Jordi Serra Torrens
              Reporter:
              Gregory Noma
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: