The driver does not check if maxPoolSize is greater than minPoolSize

XMLWordPrintableJSON

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

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: