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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Catalog and Routing

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: