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

Make a RAII User wrapper

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL

      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.

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

              Created:
              Updated:
              Resolved: