Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2862

The driver does not check if maxPoolSize is greater than minPoolSize

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.8.1
    • Component/s: Connectivity
    • Labels:
      None

      I've noticed that the driver does not mind if maxPoolSize gets set to a value lesser than minPoolSize:

      static String uri = "mongodb://adminx:123@mubuntu:27017/test?authSource=admin&minPoolSize=1000&maxPoolSize=10";
      

      I believe that the behaviour in such a configuration is undefined.

      For comparison, the Java driver throws if the same connection string is used (which I believe is the correct behaviour):

      java.lang.IllegalStateException: state should be: maxSize >= minSize
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: