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

Enforce the required lock mode in the CollectionShardingRuntime API

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • Sharding EMEA
    • Fully Compatible
    • Execution Team 2022-12-26, Execution Team 2023-01-09

    Description

      SERVER-69435 introduces a method that acquires the CollectionShardingRuntime with a given lock mode (shared or exclusive). It sometimes may not be clear which lock mode should be used to do a particular action on the CSR. This could lead to the introduction of bugs in the future.

      We should make the type of lock required be enforced by the API. One idea is to have two acquisition methods:

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

      Attachments

        Activity

          People

            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: