-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRIVERS-1389 Make ExceededTimeLimit a retryable reads error #1478
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2e4a2e2
Add unified tests for making ExceededTimeLimit a retryable error
kkloberdanz 7641533
update retryable reads spec to add ExceededTimeLimit to the list of e…
kkloberdanz 550f756
fix schema version, use 1.3 instead of 1.0
kkloberdanz 5a2c3fd
Update source/retryable-reads/tests/unified/ExceededTimeLimit.yml
kkloberdanz 6718a44
implement Jeremy's suggestions
kkloberdanz 61faa8f
use 4.1.7 for sharded and load-balanced clusters, 4.0 otherwise
kkloberdanz 820b2d0
Update source/retryable-reads/retryable-reads.rst
kkloberdanz 03acef6
implement Kevin's suggestions
kkloberdanz 2412f5f
Update source/retryable-reads/tests/unified/exceededTimeLimit.yml
kkloberdanz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
source/retryable-reads/tests/unified/exceededTimeLimit.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
source/retryable-reads/tests/unified/exceededTimeLimit.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
description: "ExceededTimeLimit is a retryable read" | ||
|
||
schemaVersion: "1.3" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "4.0" | ||
topologies: [single, replicaset] | ||
- minServerVersion: "4.1.7" | ||
topologies: [sharded, load-balanced] | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
useMultipleMongoses: false # Ensure the `configureFailpoint` and `find` command are run on the same mongos. | ||
kkloberdanz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
observeEvents: [ commandStartedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name "retryable-reads-tests" | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name "exceededtimelimit-test" | ||
|
||
initialData: | ||
- collectionName: *collection0Name | ||
databaseName: *database0Name | ||
documents: | ||
- { _id: 1, x: 11 } | ||
- { _id: 2, x: 22 } | ||
- { _id: 3, x: 33 } | ||
|
||
tests: | ||
- description: "Find succeeds on second attempt after ExceededTimeLimit" | ||
operations: | ||
- name: failPoint | ||
object: testRunner | ||
arguments: | ||
client: *client0 | ||
failPoint: | ||
configureFailPoint: failCommand | ||
mode: { times: 1 } | ||
data: | ||
failCommands: [ "find" ] | ||
errorCode: 262 # ExceededTimeLimit | ||
- name: find | ||
arguments: | ||
filter: { _id: { $gt: 1 } } | ||
object: *collection0 | ||
expectResult: | ||
- { _id: 2, x: 22 } | ||
- { _id: 3, x: 33 } | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
find: *collection0Name | ||
filter: { _id: { $gt: 1 } } | ||
commandName: find | ||
databaseName: *database0Name | ||
- commandStartedEvent: | ||
command: | ||
find: *collection0Name | ||
filter: { _id: { $gt: 1 } } | ||
commandName: find | ||
databaseName: *database0Name |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted that these requirements are consistent with the legacy tests in https://github.com/mongodb/specifications/blob/master/source/retryable-reads/tests/legacy/find.yml