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

Investigate if updateShardIdentityConfigString can use MODE_IX lock

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-04-17

      As part of SERVER-71198 we found that ShardingInitializationMongoD::updateShardIdentityConfigString is taking a database MODE_X lock and then replacing a single document in a collection underneath it without holding any collection locks.{{{}
      {}}}

      Ideally in this situation we should only acquire a MODE_IX lock using AutoGetCollection for the target collection as we already provide document-level locking with WiredTiger. This would avoid the unnecessary strong lock on the database.

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: