Refactor connection pool to semaphore-guarded spawning model

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Go Drivers
    • 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

      Context

      Refactor the connection pool's connection creation logic from a dedicated background goroutine loop into the semaphore-guarded spawning model outlined in PR #2098. This new design introduces aa connectionSem channel that enforces the maxConnecting limit by bounding the number of concurrent dial attempts. Instead of running long-lived workers, connection establishment is triggered opportunistically when new checkout requests are enqueued.

      Note that this solution might improve GC under heavy load, as noted in GODRIVER-3419.

      Definition of done

      Re-open PR #2098 for review, update as needed.

      Pitfalls

      NA

            Assignee:
            Unassigned
            Reporter:
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: