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

mongoc_client_reset should do nothing if passed a multi-threaded client

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • libmongoc
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: