Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1771

Consolidate connection pool code

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.9.0.rc0
    • Affects Version/s: None
    • Component/s: Connections
    • None

      Currently connection pool code is split between the pool and the queue, which is really a stack. This split makes the pool awkward to work with, and even more so when we need to add the wait queue for CMAP spec. Having the code split also makes it more difficult to reason about thread safety and which operations should be locked.

      Consolidating all code in the connection pool class will make the code more readable and less error prone.

      At the same time as moving the code, another improvement that can be done is have the connection pool track checked out connections. This will improve diagnostics and accountability of the pool.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: