Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1391

reset client options when returned to the pool

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.1.1
    • Component/s: Implementation
    • None

      When I acquire a client from a pool and manually modify the write concern at client level (client::write_concern(wc)), the modified client is released to the pool.

      Later on, if I acquire a new client from this pool, I may end-up with a client with the modified write concern, which does not correspond to the one the pool has been created with.

      With current behavior, application code seems to be responsible to reset the client write concern to an appropriate value before it is released to the pool.

      The pool should take care of resetting the write concern to an appropriate value or the write_concern of a client acquired from the pool should be read-only.

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            Pierre Pierre Petitprez
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: