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

[v6.0] Specify state in `config.locks` update to release all locks during step up

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.21
    • Affects Version/s: 5.0.0, 6.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • v5.0
    • CAR Team 2025-02-03, CAR Team 2025-02-17
    • 1

      This only affects versions prior to the removal of the dist lock in 6.1.

       

      When a new primary steps up, all dist locks are released for that shard in order to prevent the issue described in SERVER-57018. However, an update which queries only by process can be very slow in clusters which have a large build up of documents in config.locks. In most of these clusters, the vast majority of the documents are old documents whose locks are no longer relevant (and therefore already have the `unlocked` state).

      This update could be filtered to only update documents whose state is not equal to `unlocked` already. This would allow us to use the state: 1, process: 1 index rather than the process: 1 index and not scan nearly as many documents during this operation.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: