Skip to content

Conversation

benjirewis
Copy link
Contributor

@benjirewis benjirewis commented May 20, 2022

GODRIVER-2340

Syncs the override-operation-timeout tests that ensure that timeoutMS is set and respected at the operation level (first commit). The Go driver will not actually support setting Timeout through *Options on individual operations; instead, we'll expect users to include a timeout on the passed-in Context, as that is more idiomatic. Modifies the run function to create a Context with timeoutMS as the timeout if timeoutMS is specified in the operation arguments. Modifies execute* functions to set a Timeout of 0 on the caller of the operation in order to opt-in to behavior gated behind the presence of the Timeout variable.

Opening PRs with csot-implementation as the base branch messes with the GH Evergreen CI: so here is a patch I'll keep updated with every commit.

@benjirewis benjirewis marked this pull request as ready for review May 20, 2022 21:06
Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Included an alternate suggestion to the SetZeroTimeout API.

@benjirewis benjirewis force-pushed the csot-implementation branch from 4082b3d to 8529ddd Compare May 31, 2022 08:46
@benjirewis benjirewis requested a review from kevinAlbs June 1, 2022 13:09
@benjirewis benjirewis changed the title GODRIVER-2340 Allow the setting of timeoutMS on operations in the UTR GODRIVER-2340 Allow the setting of timeoutMS on operations in the UTR. Jun 1, 2022
Copy link
Member

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, LGTM.

@benjirewis benjirewis force-pushed the csot-implementation branch from 8529ddd to 97b6068 Compare June 2, 2022 09:58
@benjirewis benjirewis merged commit 0b29f95 into mongodb:csot-implementation Jun 2, 2022
@benjirewis benjirewis deleted the operationTimeout branch June 2, 2022 09:59
benjirewis added a commit that referenced this pull request Jun 6, 2022
GODRIVER-2341 Add Timeout to Client, Database, Collection and all basic operations. (#925)
GODRIVER-2340
GODRIVER-2405 Test RTT90 monitoring. (#948)
GODRIVER-2340 Allow the setting of timeoutMS on operations in the UTR. (#955)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants