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

Make a RAII User wrapper

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      Currently User* pointers are checked in and out of the AuthorizationManager, by entities which want to access users. The AuthorizationManager will invalidate User*s if their underlying user document is modified. When this happens, consumers should return their User* and get an up to date copy. When the old User*'s refcount reaches 0, the AuthorizationManager releases its memory.

      We should have an RAII type for Users. Then, consumers cannot forget to release the memory. It should be possible to load and remove these objects into UserSets, without ever letting ownership leak even for a moment.

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: