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

Introduce invariant in Locker::unlock that lock must have been previously acquired

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing

      If we can't find the requested resource, LockerImpl:unlock() returns false. However, there is a comment saying it is an invariant violation we try to release a lock not previously required. 

       

      Since the comment dates back to almost a decade ago, and is slightly misleading, we should probably remove it or reconsider if it is possible to guarantee we only unlock resources which have already been locked.

      We should try to re-introduce the invariant that Locker::unlock must be called on a resource previously locked by the Locker instance.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: