Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-542

Connection pool holds lock while establishing new connections in checkout

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: None
    • None

      While establishing a new connection as part of the check out process (i.e. when the pool is empty), the lock on the ConnectionManager is held. This prevents other tasks / threads from creating connections concurrently, which is a performance bottleneck and forbidden by CMAP:

      A Connection MUST NOT be checked out until it is readyToUse. In addition, the Pool MUST NOT block other threads from checking out connections while waiting for a connection to be readyToUse.

      We should release this lock while establishing connections to allow for more throughput and to become compliant with the spec.

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: