mongoc_client_reset should do nothing if passed a multi-threaded client

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.2.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • Not Needed
    • 🔵 Done
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • 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:
            Julia Garland
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: