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

Change connections to have weak references to the pool

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.9.0-alpha
    • Affects Version/s: None
    • Component/s: None
    • None

      Previous, we implemented the Connections as having strong references to the ConnectionPool to facilitate having the pool emit all CMAP events, which wouldn't otherwise be possible due to ConnectionClosed potentially occurring after the pool is dropped. However, after discussion with other in the drivers team, we came to the conclusion that keeping the pool alive (and therefore all the connections in it) until the last connection is returned is undesirable behavior, so we should change the references back to weak references and have the connections emit their own ConnectionClosed event if necessary.

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: