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

Remove lock acquisitions for CSS/DSS read only operations

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-02-17, CAR Team 2025-03-03, CAR Team 2025-03-17
    • 2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Historically we needed to hold a collection/DB lock in order to access some sharding state, but since the introduction of the CSS/DSS these are effectively the locks we use to coordinate accessing that state. We don't need to hold a higher level lock anymore, so it doesn't make sense to enforce that through the API.

      Some examples where we take those locks unnecessarily:
      https://github.com/10gen/mongo/blob/dface7ce0b386b3917010b98aa35a09dbe414589/src/mongo/db/s/migration_source_manager.cpp#L411-L416
      https://github.com/10gen/mongo/blob/dface7ce0b386b3917010b98aa35a09dbe414589/src/mongo/db/s/migration_source_manager.cpp#L634
      https://github.com/10gen/mongo/blob/dface7ce0b386b3917010b98aa35a09dbe414589/src/mongo/db/s/migration_source_manager.cpp#L236

            Assignee:
            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            Reporter:
            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None