Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1368

Avoid redundant calls to mongoc_client_reset()

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: 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 Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: