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

Use separate types for pooled and non-pooled connections

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.2.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      The driver currently has a single Connection type that is used for both monitoring connections and pooled connections. Pooled connections have a lot of extra data associated with them however (generation, event handler, pool manager, etc). When creating monitoring connections, these fields have to be None or contain placeholder values, which are error-prone and hard to reason about.

      We should introduce a new type PooledConnection which contains all that extra, pool-specific data and wraps something similar to our existing Connection type. We can then remove all the pool specific data from it and use it directly in the monitors.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: