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

Remove waitQueueTimeoutMS

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

      The CMAP spec states that waitQueueTimeoutMS is optional, and it gives the following reasoning:

      We are anticipating eventually introducing a single client-side timeout mechanism, making us hesitant to introduce another granular timeout control. Therefore, if a driver/language already has an idiomatic way to implement their timeouts, they should leverage that mechanism over implementing waitQueueTimeoutMS.

      Given that CSOT will be implemented soon and in async Rust such timeouts can be implemented by simply not awaiting the future, we should drop it from the public API.

      In the meantime, users can just use the timeout functionality from their respective runtimes as a workaround.

      e.g. for tokio:

      tokio::time::timeout(Duration::from_secs(5), coll.insert_one(doc! { "x": 1 }, None)).await?;
      

      Note this may lead to some connection churn, but it seems to be an acceptable alternative for now.

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

              Created:
              Updated:
              Resolved: