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

Investigate if updateShardIdentityConfigString can use MODE_IX lock

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-04-17

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: