Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4216

DefaultConnectionPool and ConcurrentPool incorrectly handle some maxSize values

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.4.0
    • Affects Version/s: None
    • Component/s: Connection Management
    • None
    • Fully Compatible
    • Not Needed

      • If maxSize is 0, then
        • DefaultConnectionPool.createTimeoutException works incorrectly because it considers the value to be 0 instead of being infinite;
        • ConcurrentPool is created with 0 semaphore permits and does not allow creating connections.
      • If maxSize is negative, then
        • ConcurrentPool creates a semaphore with negative permits, which means connections must be released before they can be created. The ConcurrentPool docs state "if < 0 then no limit".

            Assignee:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Reporter:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: