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

Clarify requirements around returning clients to a pool before destroying the pool

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.0-beta, 1.17.0
    • Affects Version/s: None
    • Component/s: docs
    • Labels:

      Per recent conversation with jmikola in #mongoc, it's unclear what happens if you don't return all the mongoc_client_t s checked out from a pool before you call mongoc_client_pool_destroy on the pool. 

      From my limited testing, it appears that the pool will be destroyed without complaint and attempting to use any still-checked out clients will lead to a server selection error.

      If it's required that all clients are returned to the pool before it's destroyed, this should be documented.

      Alternatively, maybe it's acceptable for the user to just manually destroy a still-checked out client with mongoc_client_destroy if they discover this occurred. 

      Either way it would be helpful for the documentation to clarify this. 

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

              Created:
              Updated:
              Resolved: