Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3492

mongoc_client_reset should do nothing if passed a multi-threaded client

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • Labels:
      None

      Currently mongoc_client_reset clears the session pool on the client's topology by calling _mongoc_topology_clear_session_pool. This is fine for a single-threaded client, but not ok for a client derived from a mongoc_client_pool_t since the topology object is shared among all pooled clients, and no lock is taken.

      We decided not to implement a mongoc_client_pool_reset in CDRIVER-2857 (relevant comment).

      mongoc_client_reset should probably warn and return without doing anything if given a multi-threaded client.

      Let's also document in mongoc_client_reset that this only applies to single threaded clients.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: