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

Warning logged when destroying client pool if client pool, session created but not used

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.0-rc0, 1.17.0
    • Affects Version/s: None
    • Component/s: None
    • None

      If you do the following:

      • Create a client pool
      • Pop a client
      • Use that client to create a session
      • Destroy the session
      • Return the client to the pool
      • Destroy the pool

      A warning is logged:

      WARNING:       client: Couldn’t send “endSessions”: Could not find node 127.0.0.1:27017"
      

      The warning is coming from the call to mongoc_cluster_stream_for_server in _mongoc_client_end_sessions.

      This does not happen in single-threaded mode.

      Haven't experienced any issues because of this, but it seems like the warning should not be logged in this case.

      Repro code attached

        1. main.c
          0.9 kB
          Kaitlin Mahar
        2. Makefile
          0.2 kB
          Kaitlin Mahar

            Assignee:
            andrew.witten@mongodb.com Andrew Witten (Inactive)
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: