Remove reference to Manager on Cursor, Server, and WriteResult objects

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 1.3.0-beta1, 1.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Before mongoc_client_t persistence was implemented in PHPC-433, mongoc_client_t objects were destroyed when freeing a Manager object. This required adding a reference to Manager objects on Cursor, Server, and WriteResult objects in PHPC-671 to avoid potential use-after-free scenarios with mongoc_client_t if a Manager was freed before other objects depending on the same client.

      This is no longer necessary in 1.2.0 and actually impedes implementation of APM in PHPC-349, since clients may now shared by multiple Managers. Removing the reference to Manager objects from these other classes will allow APM to only deal with mongoc_client_t objects and still allow creation of Server objects without a Manager.

      By reverting PHPC-671, we can leave its regression tests in place to ensure that there is no longer a use-after-free concern.

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: