[GODRIVER-2339] Design new error API for Timeout option Created: 18/Mar/22  Updated: 01/Aug/22  Resolved: 01/Aug/22

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11.0

Type: New Feature Priority: Major - P3
Reporter: Benji Rewis (Inactive) Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Client Side Operations Timeout
Quarter: FY23Q2, FY23Q3
Documentation Changes: Not Needed

 Description   

Users of CSOT will possibly encounter three errors: context.DeadlineExceeded from client-side timeouts of contexts created to honor the new Timeout option, driver.ErrDeadlineWouldBeExceeded for operations that will probably not complete a round-trip in time given the deadline of their context, and server-side errors from maxTimeMS. All three of these errors represent a similar underlying situation: Timeout is too low for the given operation. We need to decide how to hand these errors back to users.

Also sync CSOT errors spec tests.



 Comments   
Comment by Githook User [ 01/Aug/22 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: GODRIVER-2339 Use interface for RTTMonitor and add Stats method for errors. (#1009)

Extends the IsTimeout() helper to recognize the MaxTimeMSExpired error. Modifies the Server interface to contain a new RTTMonitor interface. Adds Stats() method to rttMonitor. Returns RTT monitor stats with ErrDeadlineWouldBeExceeded errors.
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/0e8481af17ca2ce1d66313b936d5e81a3cb3ff67

Generated at Thu Feb 08 08:38:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.