...
1runOn:
2 -
3 minServerVersion: "4.0"
4 topology: ["single", "replicaset"]
5 -
6 minServerVersion: "4.1.7"
7 topology: ["sharded"]
8
9database_name: &database_name "retryable-reads-tests"
10collection_name: &collection_name "coll"
11
12data:
13 - { _id: 1, x: 11 }
14 - { _id: 2, x: 22 }
15
16tests:
17 -
18 description: "EstimatedDocumentCount succeeds after InterruptedAtShutdown"
19 failPoint: &failCommand_failPoint
20 configureFailPoint: failCommand
21 mode: { times: 1 }
22 data: { failCommands: [count], errorCode: 11600 }
23 operations:
24 - &retryable_operation_succeeds
25 <<: &retryable_operation
26 name: estimatedDocumentCount
27 object: collection
28 result: 2
29 expectations:
30 - &retryable_command_started_event
31 command_started_event:
32 command:
33 count: *collection_name
34 database_name: *database_name
35 - *retryable_command_started_event
36 -
37 description: "EstimatedDocumentCount succeeds after InterruptedDueToReplStateChange"
38 failPoint:
39 <<: *failCommand_failPoint
40 data: { failCommands: [count], errorCode: 11602 }
41 operations: [*retryable_operation_succeeds]
42 expectations:
43 - *retryable_command_started_event
44 - *retryable_command_started_event
45 -
46 description: "EstimatedDocumentCount succeeds after NotWritablePrimary"
47 failPoint:
48 <<: *failCommand_failPoint
49 data: { failCommands: [count], errorCode: 10107 }
50 operations: [*retryable_operation_succeeds]
51 expectations:
52 - *retryable_command_started_event
53 - *retryable_command_started_event
54 -
55 description: "EstimatedDocumentCount succeeds after NotPrimaryNoSecondaryOk"
56 failPoint:
57 <<: *failCommand_failPoint
58 data: { failCommands: [count], errorCode: 13435 }
59 operations: [*retryable_operation_succeeds]
60 expectations:
61 - *retryable_command_started_event
62 - *retryable_command_started_event
63 -
64 description: "EstimatedDocumentCount succeeds after NotPrimaryOrSecondary"
65 failPoint:
66 <<: *failCommand_failPoint
67 data: { failCommands: [count], errorCode: 13436 }
68 operations: [*retryable_operation_succeeds]
69 expectations:
70 - *retryable_command_started_event
71 - *retryable_command_started_event
72 -
73 description: "EstimatedDocumentCount succeeds after PrimarySteppedDown"
74 failPoint:
75 <<: *failCommand_failPoint
76 data: { failCommands: [count], errorCode: 189 }
77 operations: [*retryable_operation_succeeds]
78 expectations:
79 - *retryable_command_started_event
80 - *retryable_command_started_event
81 -
82 description: "EstimatedDocumentCount succeeds after ShutdownInProgress"
83 failPoint:
84 <<: *failCommand_failPoint
85 data: { failCommands: [count], errorCode: 91 }
86 operations: [*retryable_operation_succeeds]
87 expectations:
88 - *retryable_command_started_event
89 - *retryable_command_started_event
90 -
91 description: "EstimatedDocumentCount succeeds after HostNotFound"
92 failPoint:
93 <<: *failCommand_failPoint
94 data: { failCommands: [count], errorCode: 7 }
95 operations: [*retryable_operation_succeeds]
96 expectations:
97 - *retryable_command_started_event
98 - *retryable_command_started_event
99 -
100 description: "EstimatedDocumentCount succeeds after HostUnreachable"
101 failPoint:
102 <<: *failCommand_failPoint
103 data: { failCommands: [count], errorCode: 6 }
104 operations: [*retryable_operation_succeeds]
105 expectations:
106 - *retryable_command_started_event
107 - *retryable_command_started_event
108 -
109 description: "EstimatedDocumentCount succeeds after NetworkTimeout"
110 failPoint:
111 <<: *failCommand_failPoint
112 data: { failCommands: [count], errorCode: 89 }
113 operations: [*retryable_operation_succeeds]
114 expectations:
115 - *retryable_command_started_event
116 - *retryable_command_started_event
117 -
118 description: "EstimatedDocumentCount succeeds after SocketException"
119 failPoint:
120 <<: *failCommand_failPoint
121 data: { failCommands: [count], errorCode: 9001 }
122 operations: [*retryable_operation_succeeds]
123 expectations:
124 - *retryable_command_started_event
125 - *retryable_command_started_event
126 -
127 description: "EstimatedDocumentCount fails after two NotWritablePrimary errors"
128 failPoint:
129 <<: *failCommand_failPoint
130 mode: { times: 2 }
131 data: { failCommands: [count], errorCode: 10107 }
132 operations:
133 - &retryable_operation_fails
134 <<: *retryable_operation
135 error: true
136 expectations:
137 - *retryable_command_started_event
138 - *retryable_command_started_event
139 -
140 description: "EstimatedDocumentCount fails after NotWritablePrimary when retryReads is false"
141 clientOptions:
142 retryReads: false
143 failPoint:
144 <<: *failCommand_failPoint
145 data: { failCommands: [count], errorCode: 10107 }
146 operations: [*retryable_operation_fails]
147 expectations:
148 - *retryable_command_started_event
View as plain text