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

minPoolSize bugs

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.4.2, 1.5.0
    • None
    • libmongoc
    • None

    Description

      Two bugs:

      • minPoolSize should mean "the number of inactive clients to keep cached in the pool", so when a client is pushed, if there are already minPoolSize clients in the pool, the oldest should be freed. Instead, minPoolSize is compared to pool->size, which is the total number of active or inactive clients. So if there are 10 clients total and minPoolSize is 3, all pushed clients are freed, not just clients in excess of the first 3.
      • The pool is supposed to be a LIFO for memory coherence (CDRIVER-1196) but it destroys the most-recently used client, not the least-recently used.

      Discovered investigating this message:

      https://groups.google.com/forum/#!topic/mongodb-user/FmQHSSJreTA

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: