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

DDL coordinators must not release dist locks on stepdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.4, 5.1.0-rc0
    • Affects Version/s: 5.0.0, 5.1.0
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-09-06
    • 134

      Upon stepping down, DDL coordinators are currently executing the onCompletion logic that includes the release of distributed locks.

      This is not safe, as the following interleaving may happen:

      Different approaches may be evaluated for solving the problem, for example:

      • Custom logic for coordinators to don't release distributed locks if a coordinator document still exists (may require a modification of the ScopedDistLock destructor)
      • Reason in a more general way: shall a node stepping down ever release distributed locks since all operations using a dist lock are going to be resumed by the new primary?

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: