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

Dropped futures could lead to inconsistent session/transaction/SDAM state

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Rust Drivers

      In RUST-384 and RUST-530, an issue was identified where futures being dropped before they were complete could leave connections in an unusable state (e.g. bytes from previous operation unread). This was fixed by closing connections that were found to be in such a state instead of returning them to the pool.

      With the introductions of a lot more state to operation execution in the forms of transactions and sessions, a similar issue could arise again. We should investigate what the risks are here and possible fixes.

      For more info on the pitfalls we're running into here, checkout this blog post byone of the maintainers of tokio: https://carllerche.com/2021/06/17/six-ways-to-make-async-rust-easier/

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: