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

Wait Queue Size setting doesn't affect the server selection wait queue size.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1, 2.1
    • Component/s: None
    • Labels:
      None
    • Sprint:
      C# Sprint 19

      Description

      Currently, the wait queue size doesn't affect the server selection wait queue size. We either need to start setting it, or determine a different way to handle queuing (or lack thereof) in the server selection loop.

      Workaround

      const int maxWaitQueueSize = 5000; // set this to a value that is appropriate
      var settings = new MongoClientSettings();
       
      settings.WaitQueueSize = maxWaitQueueSize;
       
      // this is the workaround for the bug.
      settings.ClusterConfigurator = cb =>
      {
      	cb.ConfigureCluster(cs => cs.With(maxServerSelectionWaitQueueSize = maxWaitQueueSize ));
      };
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              craiggwilson Craig Wilson
              Reporter:
              craiggwilson Craig Wilson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: