Debian Codegraph @

testdata/transactions/legacy/mongos-recovery-token.json

raw symbols SCIP
1 {
2 "runOn": [
3 {
4 "minServerVersion": "4.1.8",
5 "topology": [
6 "sharded"
7 ],
8 "serverless": "forbid"
9 }
10 ],
11 "database_name": "transaction-tests",
12 "collection_name": "test",
13 "data": [],
14 "tests": [
15 {
16 "description": "commitTransaction explicit retries include recoveryToken",
17 "useMultipleMongoses": true,
18 "operations": [
19 {
20 "name": "startTransaction",
21 "object": "session0"
22 },
23 {
24 "name": "insertOne",
25 "object": "collection",
26 "arguments": {
27 "session": "session0",
28 "document": {
29 "_id": 1
30 }
31 },
32 "result": {
33 "insertedId": 1
34 }
35 },
36 {
37 "name": "commitTransaction",
38 "object": "session0"
39 },
40 {
41 "name": "commitTransaction",
42 "object": "session0"
43 },
44 {
45 "name": "commitTransaction",
46 "object": "session0"
47 }
48 ],
49 "expectations": [
50 {
51 "command_started_event": {
52 "command": {
53 "insert": "test",
54 "documents": [
55 {
56 "_id": 1
57 }
58 ],
59 "ordered": true,
60 "readConcern": null,
61 "lsid": "session0",
62 "txnNumber": {
63 "$numberLong": "1"
64 },
65 "startTransaction": true,
66 "autocommit": false,
67 "writeConcern": null
68 },
69 "command_name": "insert",
70 "database_name": "transaction-tests"
71 }
72 },
73 {
74 "command_started_event": {
75 "command": {
76 "commitTransaction": 1,
77 "lsid": "session0",
78 "txnNumber": {
79 "$numberLong": "1"
80 },
81 "startTransaction": null,
82 "autocommit": false,
83 "writeConcern": null,
84 "recoveryToken": 42
85 },
86 "command_name": "commitTransaction",
87 "database_name": "admin"
88 }
89 },
90 {
91 "command_started_event": {
92 "command": {
93 "commitTransaction": 1,
94 "lsid": "session0",
95 "txnNumber": {
96 "$numberLong": "1"
97 },
98 "startTransaction": null,
99 "autocommit": false,
100 "writeConcern": {
101 "w": "majority",
102 "wtimeout": 10000
103 },
104 "recoveryToken": 42
105 },
106 "command_name": "commitTransaction",
107 "database_name": "admin"
108 }
109 },
110 {
111 "command_started_event": {
112 "command": {
113 "commitTransaction": 1,
114 "lsid": "session0",
115 "txnNumber": {
116 "$numberLong": "1"
117 },
118 "startTransaction": null,
119 "autocommit": false,
120 "writeConcern": {
121 "w": "majority",
122 "wtimeout": 10000
123 },
124 "recoveryToken": 42
125 },
126 "command_name": "commitTransaction",
127 "database_name": "admin"
128 }
129 }
130 ],
131 "outcome": {
132 "collection": {
133 "data": [
134 {
135 "_id": 1
136 }
137 ]
138 }
139 }
140 },
141 {
142 "description": "commitTransaction retry succeeds on new mongos",
143 "useMultipleMongoses": true,
144 "operations": [
145 {
146 "name": "startTransaction",
147 "object": "session0",
148 "arguments": {
149 "options": {
150 "writeConcern": {
151 "w": "majority"
152 }
153 }
154 }
155 },
156 {
157 "name": "insertOne",
158 "object": "collection",
159 "arguments": {
160 "session": "session0",
161 "document": {
162 "_id": 1
163 }
164 },
165 "result": {
166 "insertedId": 1
167 }
168 },
169 {
170 "name": "targetedFailPoint",
171 "object": "testRunner",
172 "arguments": {
173 "session": "session0",
174 "failPoint": {
175 "configureFailPoint": "failCommand",
176 "mode": {
177 "times": 1
178 },
179 "data": {
180 "failCommands": [
181 "commitTransaction"
182 ],
183 "writeConcernError": {
184 "code": 91,
185 "errmsg": "Replication is being shut down",
186 "errorLabels": [
187 "RetryableWriteError"
188 ]
189 }
190 }
191 }
192 }
193 },
194 {
195 "name": "commitTransaction",
196 "object": "session0"
197 }
198 ],
199 "expectations": [
200 {
201 "command_started_event": {
202 "command": {
203 "insert": "test",
204 "documents": [
205 {
206 "_id": 1
207 }
208 ],
209 "ordered": true,
210 "readConcern": null,
211 "lsid": "session0",
212 "txnNumber": {
213 "$numberLong": "1"
214 },
215 "startTransaction": true,
216 "autocommit": false,
217 "writeConcern": null
218 },
219 "command_name": "insert",
220 "database_name": "transaction-tests"
221 }
222 },
223 {
224 "command_started_event": {
225 "command": {
226 "commitTransaction": 1,
227 "lsid": "session0",
228 "txnNumber": {
229 "$numberLong": "1"
230 },
231 "startTransaction": null,
232 "autocommit": false,
233 "writeConcern": {
234 "w": "majority"
235 },
236 "recoveryToken": 42
237 },
238 "command_name": "commitTransaction",
239 "database_name": "admin"
240 }
241 },
242 {
243 "command_started_event": {
244 "command": {
245 "commitTransaction": 1,
246 "lsid": "session0",
247 "txnNumber": {
248 "$numberLong": "1"
249 },
250 "startTransaction": null,
251 "autocommit": false,
252 "writeConcern": {
253 "w": "majority",
254 "wtimeout": 10000
255 },
256 "recoveryToken": 42
257 },
258 "command_name": "commitTransaction",
259 "database_name": "admin"
260 }
261 }
262 ],
263 "outcome": {
264 "collection": {
265 "data": [
266 {
267 "_id": 1
268 }
269 ]
270 }
271 }
272 },
273 {
274 "description": "commitTransaction retry fails on new mongos",
275 "useMultipleMongoses": true,
276 "clientOptions": {
277 "heartbeatFrequencyMS": 30000
278 },
279 "operations": [
280 {
281 "name": "startTransaction",
282 "object": "session0"
283 },
284 {
285 "name": "insertOne",
286 "object": "collection",
287 "arguments": {
288 "session": "session0",
289 "document": {
290 "_id": 1
291 }
292 },
293 "result": {
294 "insertedId": 1
295 }
296 },
297 {
298 "name": "targetedFailPoint",
299 "object": "testRunner",
300 "arguments": {
301 "session": "session0",
302 "failPoint": {
303 "configureFailPoint": "failCommand",
304 "mode": {
305 "times": 7
306 },
307 "data": {
308 "failCommands": [
309 "commitTransaction",
310 "isMaster",
311 "hello"
312 ],
313 "closeConnection": true
314 }
315 }
316 }
317 },
318 {
319 "name": "commitTransaction",
320 "object": "session0",
321 "result": {
322 "errorLabelsContain": [
323 "TransientTransactionError"
324 ],
325 "errorLabelsOmit": [
326 "UnknownTransactionCommitResult"
327 ],
328 "errorCodeName": "NoSuchTransaction"
329 }
330 }
331 ],
332 "expectations": [
333 {
334 "command_started_event": {
335 "command": {
336 "insert": "test",
337 "documents": [
338 {
339 "_id": 1
340 }
341 ],
342 "ordered": true,
343 "readConcern": null,
344 "lsid": "session0",
345 "txnNumber": {
346 "$numberLong": "1"
347 },
348 "startTransaction": true,
349 "autocommit": false,
350 "writeConcern": null
351 },
352 "command_name": "insert",
353 "database_name": "transaction-tests"
354 }
355 },
356 {
357 "command_started_event": {
358 "command": {
359 "commitTransaction": 1,
360 "lsid": "session0",
361 "txnNumber": {
362 "$numberLong": "1"
363 },
364 "startTransaction": null,
365 "autocommit": false,
366 "writeConcern": null,
367 "recoveryToken": 42
368 },
369 "command_name": "commitTransaction",
370 "database_name": "admin"
371 }
372 },
373 {
374 "command_started_event": {
375 "command": {
376 "commitTransaction": 1,
377 "lsid": "session0",
378 "txnNumber": {
379 "$numberLong": "1"
380 },
381 "startTransaction": null,
382 "autocommit": false,
383 "writeConcern": {
384 "w": "majority",
385 "wtimeout": 10000
386 },
387 "recoveryToken": 42
388 },
389 "command_name": "commitTransaction",
390 "database_name": "admin"
391 }
392 }
393 ],
394 "outcome": {
395 "collection": {
396 "data": []
397 }
398 }
399 },
400 {
401 "description": "abortTransaction sends recoveryToken",
402 "useMultipleMongoses": true,
403 "operations": [
404 {
405 "name": "startTransaction",
406 "object": "session0"
407 },
408 {
409 "name": "insertOne",
410 "object": "collection",
411 "arguments": {
412 "session": "session0",
413 "document": {
414 "_id": 1
415 }
416 },
417 "result": {
418 "insertedId": 1
419 }
420 },
421 {
422 "name": "targetedFailPoint",
423 "object": "testRunner",
424 "arguments": {
425 "session": "session0",
426 "failPoint": {
427 "configureFailPoint": "failCommand",
428 "mode": {
429 "times": 1
430 },
431 "data": {
432 "failCommands": [
433 "abortTransaction"
434 ],
435 "closeConnection": true
436 }
437 }
438 }
439 },
440 {
441 "name": "abortTransaction",
442 "object": "session0"
443 }
444 ],
445 "expectations": [
446 {
447 "command_started_event": {
448 "command": {
449 "insert": "test",
450 "documents": [
451 {
452 "_id": 1
453 }
454 ],
455 "ordered": true,
456 "readConcern": null,
457 "lsid": "session0",
458 "txnNumber": {
459 "$numberLong": "1"
460 },
461 "startTransaction": true,
462 "autocommit": false,
463 "writeConcern": null
464 },
465 "command_name": "insert",
466 "database_name": "transaction-tests"
467 }
468 },
469 {
470 "command_started_event": {
471 "command": {
472 "abortTransaction": 1,
473 "lsid": "session0",
474 "txnNumber": {
475 "$numberLong": "1"
476 },
477 "startTransaction": null,
478 "autocommit": false,
479 "writeConcern": null,
480 "recoveryToken": 42
481 },
482 "command_name": "abortTransaction",
483 "database_name": "admin"
484 }
485 },
486 {
487 "command_started_event": {
488 "command": {
489 "abortTransaction": 1,
490 "lsid": "session0",
491 "txnNumber": {
492 "$numberLong": "1"
493 },
494 "startTransaction": null,
495 "autocommit": false,
496 "writeConcern": null,
497 "recoveryToken": 42
498 },
499 "command_name": "abortTransaction",
500 "database_name": "admin"
501 }
502 }
503 ],
504 "outcome": {
505 "collection": {
506 "data": []
507 }
508 }
509 }
510 ]
511 }