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

Enforce the required lock mode in the DatabaseShardingState API

    • 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-02-20

      Similarly to SERVER-69770 , we should make the type of lock required to take the DatabaseShardingState be enforced by the API. One idea is to have two acquisition methods:

      • One that takes the exclusive lock and returns a non-const DSS.
      • The other takes the shared lock and returns a const DSS.
      • All methods that modify the DSS (i.e. need exclusive lock) should be made non-const. All methods that do not modify the DSS should be made const.

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

              Created:
              Updated:
              Resolved: