Avoid redundant calls to mongoc_client_reset()

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Offshoot of PHPC-1274:

      In order to avoid calling mongoc_client_reset() redundantly, the PHP driver should include some logic to determine if it has already been invoked for a given PID.

      This can be done by allocating a hash table in GINIT (so it is reset for each process and thread) to track which clients have been reset. The various free_object handlers modified in PHPC-1274 can then consult this hash table before calling mongoc_client_reset() to avoid advancing the mongo_client_t's generation counter more times than necessary.

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

                Created:
                Updated:
                Resolved: