Debian Codegraph @

testdata/transactions/legacy/mongos-pin-auto.yml

raw symbols SCIP
1 # Autogenerated tests that transient errors in a transaction unpin the session.
2 # See mongos-pin-auto-tests.py
3 runOn:
4 -
5 minServerVersion: "4.1.8"
6 topology: ["sharded"]
7 # serverless proxy doesn't append error labels to errors in transactions
8 # caused by failpoints (CLOUDP-88216)
9 serverless: "forbid"
10
11 database_name: &database_name "transaction-tests"
12 collection_name: &collection_name "test"
13
14 data: &data
15 - {_id: 1}
16 - {_id: 2}
17
18 tests:
19 - description: remain pinned after non-transient Interrupted error on insertOne
20 useMultipleMongoses: true
21 operations:
22 - &startTransaction
23 name: startTransaction
24 object: session0
25 - &initialCommand
26 name: insertOne
27 object: collection
28 arguments:
29 session: session0
30 document: {_id: 3}
31 result:
32 insertedId: 3
33 - name: targetedFailPoint
34 object: testRunner
35 arguments:
36 session: session0
37 failPoint:
38 configureFailPoint: failCommand
39 mode: {times: 1}
40 data:
41 failCommands: ["insert"]
42 errorCode: 11601
43 - name: insertOne
44 object: collection
45 arguments:
46 session: session0
47 document:
48 _id: 4
49 result:
50 errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"]
51 errorCodeName: Interrupted
52 - &assertSessionPinned
53 name: assertSessionPinned
54 object: testRunner
55 arguments:
56 session: session0
57 - &commitTransaction
58 name: commitTransaction
59 object: session0
60
61 expectations:
62 - command_started_event:
63 command:
64 insert: *collection_name
65 documents:
66 - _id: 3
67 ordered: true
68 readConcern:
69 lsid: session0
70 txnNumber:
71 $numberLong: "1"
72 startTransaction: true
73 autocommit: false
74 writeConcern:
75 command_name: insert
76 database_name: *database_name
77 - command_started_event:
78 command:
79 insert: *collection_name
80 documents:
81 - _id: 4
82 ordered: true
83 readConcern:
84 lsid: session0
85 txnNumber:
86 $numberLong: "1"
87 startTransaction:
88 autocommit: false
89 writeConcern:
90 command_name: insert
91 database_name: *database_name
92 - command_started_event:
93 command:
94 commitTransaction: 1
95 lsid: session0
96 txnNumber:
97 $numberLong: "1"
98 startTransaction:
99 autocommit: false
100 writeConcern:
101 recoveryToken: 42
102 command_name: commitTransaction
103 database_name: admin
104
105 outcome: &outcome
106 collection:
107 data:
108 - {_id: 1}
109 - {_id: 2}
110 - {_id: 3}
111
112 - description: unpin after transient error within a transaction
113 useMultipleMongoses: true
114 operations:
115 - &startTransaction
116 name: startTransaction
117 object: session0
118 - &initialCommand
119 name: insertOne
120 object: collection
121 arguments:
122 session: session0
123 document:
124 _id: 3
125 result:
126 insertedId: 3
127 - name: targetedFailPoint
128 object: testRunner
129 arguments:
130 session: session0
131 failPoint:
132 configureFailPoint: failCommand
133 mode: { times: 1 }
134 data:
135 failCommands: ["insert"]
136 closeConnection: true
137 - name: insertOne
138 object: collection
139 arguments:
140 session: session0
141 document:
142 _id: 4
143 result:
144 errorLabelsContain: ["TransientTransactionError"]
145 errorLabelsOmit: ["UnknownTransactionCommitResult"]
146 # Session unpins from the first mongos after the insert error and
147 # abortTransaction succeeds immediately on any mongos.
148 - &assertSessionUnpinned
149 name: assertSessionUnpinned
150 object: testRunner
151 arguments:
152 session: session0
153 - &abortTransaction
154 name: abortTransaction
155 object: session0
156
157 expectations:
158 - command_started_event:
159 command:
160 insert: *collection_name
161 documents:
162 - _id: 3
163 ordered: true
164 readConcern:
165 lsid: session0
166 txnNumber:
167 $numberLong: "1"
168 startTransaction: true
169 autocommit: false
170 writeConcern:
171 command_name: insert
172 database_name: *database_name
173 - command_started_event:
174 command:
175 insert: *collection_name
176 documents:
177 - _id: 4
178 ordered: true
179 readConcern:
180 lsid: session0
181 txnNumber:
182 $numberLong: "1"
183 startTransaction:
184 autocommit: false
185 writeConcern:
186 command_name: insert
187 database_name: *database_name
188 - command_started_event:
189 command:
190 abortTransaction: 1
191 lsid: session0
192 txnNumber:
193 $numberLong: "1"
194 startTransaction:
195 autocommit: false
196 writeConcern:
197 recoveryToken: 42
198 command_name: abortTransaction
199 database_name: admin
200
201 outcome: &outcome
202 collection:
203 data: *data
204
205 # The rest of the tests in this file test every operation type against
206 # multiple types of transient errors (connection and error code).
207
208 - description: remain pinned after non-transient Interrupted error on insertOne insert
209 useMultipleMongoses: true
210 operations:
211 - *startTransaction
212 - *initialCommand
213 - name: targetedFailPoint
214 object: testRunner
215 arguments:
216 session: session0
217 failPoint:
218 configureFailPoint: failCommand
219 mode: {times: 1}
220 data:
221 failCommands: ["insert"]
222 errorCode: 11601
223 - name: insertOne
224 object: collection
225 arguments:
226 session: session0
227 document: {_id: 4}
228 result:
229 errorLabelsOmit: ["TransientTransactionError"]
230 - *assertSessionPinned
231 - *abortTransaction
232 outcome: *outcome
233
234 - description: remain pinned after non-transient Interrupted error on insertMany insert
235 useMultipleMongoses: true
236 operations:
237 - *startTransaction
238 - *initialCommand
239 - name: targetedFailPoint
240 object: testRunner
241 arguments:
242 session: session0
243 failPoint:
244 configureFailPoint: failCommand
245 mode: {times: 1}
246 data:
247 failCommands: ["insert"]
248 errorCode: 11601
249 - name: insertMany
250 object: collection
251 arguments:
252 session: session0
253 documents: [{_id: 4}, {_id: 5}]
254 result:
255 errorLabelsOmit: ["TransientTransactionError"]
256 - *assertSessionPinned
257 - *abortTransaction
258 outcome: *outcome
259
260 - description: remain pinned after non-transient Interrupted error on updateOne update
261 useMultipleMongoses: true
262 operations:
263 - *startTransaction
264 - *initialCommand
265 - name: targetedFailPoint
266 object: testRunner
267 arguments:
268 session: session0
269 failPoint:
270 configureFailPoint: failCommand
271 mode: {times: 1}
272 data:
273 failCommands: ["update"]
274 errorCode: 11601
275 - name: updateOne
276 object: collection
277 arguments:
278 session: session0
279 filter: {_id: 1}
280 update: {$inc: {x: 1}}
281 result:
282 errorLabelsOmit: ["TransientTransactionError"]
283 - *assertSessionPinned
284 - *abortTransaction
285 outcome: *outcome
286
287 - description: remain pinned after non-transient Interrupted error on replaceOne update
288 useMultipleMongoses: true
289 operations:
290 - *startTransaction
291 - *initialCommand
292 - name: targetedFailPoint
293 object: testRunner
294 arguments:
295 session: session0
296 failPoint:
297 configureFailPoint: failCommand
298 mode: {times: 1}
299 data:
300 failCommands: ["update"]
301 errorCode: 11601
302 - name: replaceOne
303 object: collection
304 arguments:
305 session: session0
306 filter: {_id: 1}
307 replacement: {y: 1}
308 result:
309 errorLabelsOmit: ["TransientTransactionError"]
310 - *assertSessionPinned
311 - *abortTransaction
312 outcome: *outcome
313
314 - description: remain pinned after non-transient Interrupted error on updateMany update
315 useMultipleMongoses: true
316 operations:
317 - *startTransaction
318 - *initialCommand
319 - name: targetedFailPoint
320 object: testRunner
321 arguments:
322 session: session0
323 failPoint:
324 configureFailPoint: failCommand
325 mode: {times: 1}
326 data:
327 failCommands: ["update"]
328 errorCode: 11601
329 - name: updateMany
330 object: collection
331 arguments:
332 session: session0
333 filter: {_id: {$gte: 1}}
334 update: {$set: {z: 1}}
335 result:
336 errorLabelsOmit: ["TransientTransactionError"]
337 - *assertSessionPinned
338 - *abortTransaction
339 outcome: *outcome
340
341 - description: remain pinned after non-transient Interrupted error on deleteOne delete
342 useMultipleMongoses: true
343 operations:
344 - *startTransaction
345 - *initialCommand
346 - name: targetedFailPoint
347 object: testRunner
348 arguments:
349 session: session0
350 failPoint:
351 configureFailPoint: failCommand
352 mode: {times: 1}
353 data:
354 failCommands: ["delete"]
355 errorCode: 11601
356 - name: deleteOne
357 object: collection
358 arguments:
359 session: session0
360 filter: {_id: 1}
361 result:
362 errorLabelsOmit: ["TransientTransactionError"]
363 - *assertSessionPinned
364 - *abortTransaction
365 outcome: *outcome
366
367 - description: remain pinned after non-transient Interrupted error on deleteMany delete
368 useMultipleMongoses: true
369 operations:
370 - *startTransaction
371 - *initialCommand
372 - name: targetedFailPoint
373 object: testRunner
374 arguments:
375 session: session0
376 failPoint:
377 configureFailPoint: failCommand
378 mode: {times: 1}
379 data:
380 failCommands: ["delete"]
381 errorCode: 11601
382 - name: deleteMany
383 object: collection
384 arguments:
385 session: session0
386 filter: {_id: {$gte: 1}}
387 result:
388 errorLabelsOmit: ["TransientTransactionError"]
389 - *assertSessionPinned
390 - *abortTransaction
391 outcome: *outcome
392
393 - description: remain pinned after non-transient Interrupted error on findOneAndDelete findAndModify
394 useMultipleMongoses: true
395 operations:
396 - *startTransaction
397 - *initialCommand
398 - name: targetedFailPoint
399 object: testRunner
400 arguments:
401 session: session0
402 failPoint:
403 configureFailPoint: failCommand
404 mode: {times: 1}
405 data:
406 failCommands: ["findAndModify"]
407 errorCode: 11601
408 - name: findOneAndDelete
409 object: collection
410 arguments:
411 session: session0
412 filter: {_id: 1}
413 result:
414 errorLabelsOmit: ["TransientTransactionError"]
415 - *assertSessionPinned
416 - *abortTransaction
417 outcome: *outcome
418
419 - description: remain pinned after non-transient Interrupted error on findOneAndUpdate findAndModify
420 useMultipleMongoses: true
421 operations:
422 - *startTransaction
423 - *initialCommand
424 - name: targetedFailPoint
425 object: testRunner
426 arguments:
427 session: session0
428 failPoint:
429 configureFailPoint: failCommand
430 mode: {times: 1}
431 data:
432 failCommands: ["findAndModify"]
433 errorCode: 11601
434 - name: findOneAndUpdate
435 object: collection
436 arguments:
437 session: session0
438 filter: {_id: 1}
439 update: {$inc: {x: 1}}
440 returnDocument: Before
441 result:
442 errorLabelsOmit: ["TransientTransactionError"]
443 - *assertSessionPinned
444 - *abortTransaction
445 outcome: *outcome
446
447 - description: remain pinned after non-transient Interrupted error on findOneAndReplace findAndModify
448 useMultipleMongoses: true
449 operations:
450 - *startTransaction
451 - *initialCommand
452 - name: targetedFailPoint
453 object: testRunner
454 arguments:
455 session: session0
456 failPoint:
457 configureFailPoint: failCommand
458 mode: {times: 1}
459 data:
460 failCommands: ["findAndModify"]
461 errorCode: 11601
462 - name: findOneAndReplace
463 object: collection
464 arguments:
465 session: session0
466 filter: {_id: 1}
467 replacement: {y: 1}
468 returnDocument: Before
469 result:
470 errorLabelsOmit: ["TransientTransactionError"]
471 - *assertSessionPinned
472 - *abortTransaction
473 outcome: *outcome
474
475 - description: remain pinned after non-transient Interrupted error on bulkWrite insert
476 useMultipleMongoses: true
477 operations:
478 - *startTransaction
479 - *initialCommand
480 - name: targetedFailPoint
481 object: testRunner
482 arguments:
483 session: session0
484 failPoint:
485 configureFailPoint: failCommand
486 mode: {times: 1}
487 data:
488 failCommands: ["insert"]
489 errorCode: 11601
490 - name: bulkWrite
491 object: collection
492 arguments:
493 session: session0
494 requests:
495 - name: insertOne
496 arguments:
497 document: {_id: 1}
498 result:
499 errorLabelsOmit: ["TransientTransactionError"]
500 - *assertSessionPinned
501 - *abortTransaction
502 outcome: *outcome
503
504 - description: remain pinned after non-transient Interrupted error on bulkWrite update
505 useMultipleMongoses: true
506 operations:
507 - *startTransaction
508 - *initialCommand
509 - name: targetedFailPoint
510 object: testRunner
511 arguments:
512 session: session0
513 failPoint:
514 configureFailPoint: failCommand
515 mode: {times: 1}
516 data:
517 failCommands: ["update"]
518 errorCode: 11601
519 - name: bulkWrite
520 object: collection
521 arguments:
522 session: session0
523 requests:
524 - name: updateOne
525 arguments:
526 filter: {_id: 1}
527 update: {$set: {x: 1}}
528 result:
529 errorLabelsOmit: ["TransientTransactionError"]
530 - *assertSessionPinned
531 - *abortTransaction
532 outcome: *outcome
533
534 - description: remain pinned after non-transient Interrupted error on bulkWrite delete
535 useMultipleMongoses: true
536 operations:
537 - *startTransaction
538 - *initialCommand
539 - name: targetedFailPoint
540 object: testRunner
541 arguments:
542 session: session0
543 failPoint:
544 configureFailPoint: failCommand
545 mode: {times: 1}
546 data:
547 failCommands: ["delete"]
548 errorCode: 11601
549 - name: bulkWrite
550 object: collection
551 arguments:
552 session: session0
553 requests:
554 - name: deleteOne
555 arguments:
556 filter: {_id: 1}
557 result:
558 errorLabelsOmit: ["TransientTransactionError"]
559 - *assertSessionPinned
560 - *abortTransaction
561 outcome: *outcome
562
563 - description: remain pinned after non-transient Interrupted error on find find
564 useMultipleMongoses: true
565 operations:
566 - *startTransaction
567 - *initialCommand
568 - name: targetedFailPoint
569 object: testRunner
570 arguments:
571 session: session0
572 failPoint:
573 configureFailPoint: failCommand
574 mode: {times: 1}
575 data:
576 failCommands: ["find"]
577 errorCode: 11601
578 - name: find
579 object: collection
580 arguments:
581 session: session0
582 filter: {_id: 1}
583 result:
584 errorLabelsOmit: ["TransientTransactionError"]
585 - *assertSessionPinned
586 - *abortTransaction
587 outcome: *outcome
588
589 - description: remain pinned after non-transient Interrupted error on countDocuments aggregate
590 useMultipleMongoses: true
591 operations:
592 - *startTransaction
593 - *initialCommand
594 - name: targetedFailPoint
595 object: testRunner
596 arguments:
597 session: session0
598 failPoint:
599 configureFailPoint: failCommand
600 mode: {times: 1}
601 data:
602 failCommands: ["aggregate"]
603 errorCode: 11601
604 - name: countDocuments
605 object: collection
606 arguments:
607 session: session0
608 filter: {}
609 result:
610 errorLabelsOmit: ["TransientTransactionError"]
611 - *assertSessionPinned
612 - *abortTransaction
613 outcome: *outcome
614
615 - description: remain pinned after non-transient Interrupted error on aggregate aggregate
616 useMultipleMongoses: true
617 operations:
618 - *startTransaction
619 - *initialCommand
620 - name: targetedFailPoint
621 object: testRunner
622 arguments:
623 session: session0
624 failPoint:
625 configureFailPoint: failCommand
626 mode: {times: 1}
627 data:
628 failCommands: ["aggregate"]
629 errorCode: 11601
630 - name: aggregate
631 object: collection
632 arguments:
633 session: session0
634 pipeline: []
635 result:
636 errorLabelsOmit: ["TransientTransactionError"]
637 - *assertSessionPinned
638 - *abortTransaction
639 outcome: *outcome
640
641 - description: remain pinned after non-transient Interrupted error on distinct distinct
642 useMultipleMongoses: true
643 operations:
644 - *startTransaction
645 - *initialCommand
646 - name: targetedFailPoint
647 object: testRunner
648 arguments:
649 session: session0
650 failPoint:
651 configureFailPoint: failCommand
652 mode: {times: 1}
653 data:
654 failCommands: ["distinct"]
655 errorCode: 11601
656 - name: distinct
657 object: collection
658 arguments:
659 session: session0
660 fieldName: _id
661 result:
662 errorLabelsOmit: ["TransientTransactionError"]
663 - *assertSessionPinned
664 - *abortTransaction
665 outcome: *outcome
666
667 - description: remain pinned after non-transient Interrupted error on runCommand insert
668 useMultipleMongoses: true
669 operations:
670 - *startTransaction
671 - *initialCommand
672 - name: targetedFailPoint
673 object: testRunner
674 arguments:
675 session: session0
676 failPoint:
677 configureFailPoint: failCommand
678 mode: {times: 1}
679 data:
680 failCommands: ["insert"]
681 errorCode: 11601
682 - name: runCommand
683 object: database
684 command_name: insert
685 arguments:
686 session: session0
687 command:
688 insert: *collection_name
689 documents:
690 - _id : 1
691 result:
692 errorLabelsOmit: ["TransientTransactionError"]
693 - *assertSessionPinned
694 - *abortTransaction
695 outcome: *outcome
696
697 - description: unpin after transient connection error on insertOne insert
698 useMultipleMongoses: true
699 operations:
700 - *startTransaction
701 - *initialCommand
702 - name: targetedFailPoint
703 object: testRunner
704 arguments:
705 session: session0
706 failPoint:
707 configureFailPoint: failCommand
708 mode: {times: 1}
709 data:
710 failCommands: ["insert"]
711 closeConnection: true
712 - name: insertOne
713 object: collection
714 arguments:
715 session: session0
716 document: {_id: 4}
717 result:
718 errorLabelsContain: ["TransientTransactionError"]
719 - *assertSessionUnpinned
720 - *abortTransaction
721 outcome: *outcome
722
723 - description: unpin after transient ShutdownInProgress error on insertOne insert
724 useMultipleMongoses: true
725 operations:
726 - *startTransaction
727 - *initialCommand
728 - name: targetedFailPoint
729 object: testRunner
730 arguments:
731 session: session0
732 failPoint:
733 configureFailPoint: failCommand
734 mode: {times: 1}
735 data:
736 failCommands: ["insert"]
737 errorCode: 91
738 - name: insertOne
739 object: collection
740 arguments:
741 session: session0
742 document: {_id: 4}
743 result:
744 errorLabelsContain: ["TransientTransactionError"]
745 - *assertSessionUnpinned
746 - *abortTransaction
747 outcome: *outcome
748
749 - description: unpin after transient connection error on insertMany insert
750 useMultipleMongoses: true
751 operations:
752 - *startTransaction
753 - *initialCommand
754 - name: targetedFailPoint
755 object: testRunner
756 arguments:
757 session: session0
758 failPoint:
759 configureFailPoint: failCommand
760 mode: {times: 1}
761 data:
762 failCommands: ["insert"]
763 closeConnection: true
764 - name: insertMany
765 object: collection
766 arguments:
767 session: session0
768 documents: [{_id: 4}, {_id: 5}]
769 result:
770 errorLabelsContain: ["TransientTransactionError"]
771 - *assertSessionUnpinned
772 - *abortTransaction
773 outcome: *outcome
774
775 - description: unpin after transient ShutdownInProgress error on insertMany insert
776 useMultipleMongoses: true
777 operations:
778 - *startTransaction
779 - *initialCommand
780 - name: targetedFailPoint
781 object: testRunner
782 arguments:
783 session: session0
784 failPoint:
785 configureFailPoint: failCommand
786 mode: {times: 1}
787 data:
788 failCommands: ["insert"]
789 errorCode: 91
790 - name: insertMany
791 object: collection
792 arguments:
793 session: session0
794 documents: [{_id: 4}, {_id: 5}]
795 result:
796 errorLabelsContain: ["TransientTransactionError"]
797 - *assertSessionUnpinned
798 - *abortTransaction
799 outcome: *outcome
800
801 - description: unpin after transient connection error on updateOne update
802 useMultipleMongoses: true
803 operations:
804 - *startTransaction
805 - *initialCommand
806 - name: targetedFailPoint
807 object: testRunner
808 arguments:
809 session: session0
810 failPoint:
811 configureFailPoint: failCommand
812 mode: {times: 1}
813 data:
814 failCommands: ["update"]
815 closeConnection: true
816 - name: updateOne
817 object: collection
818 arguments:
819 session: session0
820 filter: {_id: 1}
821 update: {$inc: {x: 1}}
822 result:
823 errorLabelsContain: ["TransientTransactionError"]
824 - *assertSessionUnpinned
825 - *abortTransaction
826 outcome: *outcome
827
828 - description: unpin after transient ShutdownInProgress error on updateOne update
829 useMultipleMongoses: true
830 operations:
831 - *startTransaction
832 - *initialCommand
833 - name: targetedFailPoint
834 object: testRunner
835 arguments:
836 session: session0
837 failPoint:
838 configureFailPoint: failCommand
839 mode: {times: 1}
840 data:
841 failCommands: ["update"]
842 errorCode: 91
843 - name: updateOne
844 object: collection
845 arguments:
846 session: session0
847 filter: {_id: 1}
848 update: {$inc: {x: 1}}
849 result:
850 errorLabelsContain: ["TransientTransactionError"]
851 - *assertSessionUnpinned
852 - *abortTransaction
853 outcome: *outcome
854
855 - description: unpin after transient connection error on replaceOne update
856 useMultipleMongoses: true
857 operations:
858 - *startTransaction
859 - *initialCommand
860 - name: targetedFailPoint
861 object: testRunner
862 arguments:
863 session: session0
864 failPoint:
865 configureFailPoint: failCommand
866 mode: {times: 1}
867 data:
868 failCommands: ["update"]
869 closeConnection: true
870 - name: replaceOne
871 object: collection
872 arguments:
873 session: session0
874 filter: {_id: 1}
875 replacement: {y: 1}
876 result:
877 errorLabelsContain: ["TransientTransactionError"]
878 - *assertSessionUnpinned
879 - *abortTransaction
880 outcome: *outcome
881
882 - description: unpin after transient ShutdownInProgress error on replaceOne update
883 useMultipleMongoses: true
884 operations:
885 - *startTransaction
886 - *initialCommand
887 - name: targetedFailPoint
888 object: testRunner
889 arguments:
890 session: session0
891 failPoint:
892 configureFailPoint: failCommand
893 mode: {times: 1}
894 data:
895 failCommands: ["update"]
896 errorCode: 91
897 - name: replaceOne
898 object: collection
899 arguments:
900 session: session0
901 filter: {_id: 1}
902 replacement: {y: 1}
903 result:
904 errorLabelsContain: ["TransientTransactionError"]
905 - *assertSessionUnpinned
906 - *abortTransaction
907 outcome: *outcome
908
909 - description: unpin after transient connection error on updateMany update
910 useMultipleMongoses: true
911 operations:
912 - *startTransaction
913 - *initialCommand
914 - name: targetedFailPoint
915 object: testRunner
916 arguments:
917 session: session0
918 failPoint:
919 configureFailPoint: failCommand
920 mode: {times: 1}
921 data:
922 failCommands: ["update"]
923 closeConnection: true
924 - name: updateMany
925 object: collection
926 arguments:
927 session: session0
928 filter: {_id: {$gte: 1}}
929 update: {$set: {z: 1}}
930 result:
931 errorLabelsContain: ["TransientTransactionError"]
932 - *assertSessionUnpinned
933 - *abortTransaction
934 outcome: *outcome
935
936 - description: unpin after transient ShutdownInProgress error on updateMany update
937 useMultipleMongoses: true
938 operations:
939 - *startTransaction
940 - *initialCommand
941 - name: targetedFailPoint
942 object: testRunner
943 arguments:
944 session: session0
945 failPoint:
946 configureFailPoint: failCommand
947 mode: {times: 1}
948 data:
949 failCommands: ["update"]
950 errorCode: 91
951 - name: updateMany
952 object: collection
953 arguments:
954 session: session0
955 filter: {_id: {$gte: 1}}
956 update: {$set: {z: 1}}
957 result:
958 errorLabelsContain: ["TransientTransactionError"]
959 - *assertSessionUnpinned
960 - *abortTransaction
961 outcome: *outcome
962
963 - description: unpin after transient connection error on deleteOne delete
964 useMultipleMongoses: true
965 operations:
966 - *startTransaction
967 - *initialCommand
968 - name: targetedFailPoint
969 object: testRunner
970 arguments:
971 session: session0
972 failPoint:
973 configureFailPoint: failCommand
974 mode: {times: 1}
975 data:
976 failCommands: ["delete"]
977 closeConnection: true
978 - name: deleteOne
979 object: collection
980 arguments:
981 session: session0
982 filter: {_id: 1}
983 result:
984 errorLabelsContain: ["TransientTransactionError"]
985 - *assertSessionUnpinned
986 - *abortTransaction
987 outcome: *outcome
988
989 - description: unpin after transient ShutdownInProgress error on deleteOne delete
990 useMultipleMongoses: true
991 operations:
992 - *startTransaction
993 - *initialCommand
994 - name: targetedFailPoint
995 object: testRunner
996 arguments:
997 session: session0
998 failPoint:
999 configureFailPoint: failCommand
1000 mode: {times: 1}
1001 data:
1002 failCommands: ["delete"]
1003 errorCode: 91
1004 - name: deleteOne
1005 object: collection
1006 arguments:
1007 session: session0
1008 filter: {_id: 1}
1009 result:
1010 errorLabelsContain: ["TransientTransactionError"]
1011 - *assertSessionUnpinned
1012 - *abortTransaction
1013 outcome: *outcome
1014
1015 - description: unpin after transient connection error on deleteMany delete
1016 useMultipleMongoses: true
1017 operations:
1018 - *startTransaction
1019 - *initialCommand
1020 - name: targetedFailPoint
1021 object: testRunner
1022 arguments:
1023 session: session0
1024 failPoint:
1025 configureFailPoint: failCommand
1026 mode: {times: 1}
1027 data:
1028 failCommands: ["delete"]
1029 closeConnection: true
1030 - name: deleteMany
1031 object: collection
1032 arguments:
1033 session: session0
1034 filter: {_id: {$gte: 1}}
1035 result:
1036 errorLabelsContain: ["TransientTransactionError"]
1037 - *assertSessionUnpinned
1038 - *abortTransaction
1039 outcome: *outcome
1040
1041 - description: unpin after transient ShutdownInProgress error on deleteMany delete
1042 useMultipleMongoses: true
1043 operations:
1044 - *startTransaction
1045 - *initialCommand
1046 - name: targetedFailPoint
1047 object: testRunner
1048 arguments:
1049 session: session0
1050 failPoint:
1051 configureFailPoint: failCommand
1052 mode: {times: 1}
1053 data:
1054 failCommands: ["delete"]
1055 errorCode: 91
1056 - name: deleteMany
1057 object: collection
1058 arguments:
1059 session: session0
1060 filter: {_id: {$gte: 1}}
1061 result:
1062 errorLabelsContain: ["TransientTransactionError"]
1063 - *assertSessionUnpinned
1064 - *abortTransaction
1065 outcome: *outcome
1066
1067 - description: unpin after transient connection error on findOneAndDelete findAndModify
1068 useMultipleMongoses: true
1069 operations:
1070 - *startTransaction
1071 - *initialCommand
1072 - name: targetedFailPoint
1073 object: testRunner
1074 arguments:
1075 session: session0
1076 failPoint:
1077 configureFailPoint: failCommand
1078 mode: {times: 1}
1079 data:
1080 failCommands: ["findAndModify"]
1081 closeConnection: true
1082 - name: findOneAndDelete
1083 object: collection
1084 arguments:
1085 session: session0
1086 filter: {_id: 1}
1087 result:
1088 errorLabelsContain: ["TransientTransactionError"]
1089 - *assertSessionUnpinned
1090 - *abortTransaction
1091 outcome: *outcome
1092
1093 - description: unpin after transient ShutdownInProgress error on findOneAndDelete findAndModify
1094 useMultipleMongoses: true
1095 operations:
1096 - *startTransaction
1097 - *initialCommand
1098 - name: targetedFailPoint
1099 object: testRunner
1100 arguments:
1101 session: session0
1102 failPoint:
1103 configureFailPoint: failCommand
1104 mode: {times: 1}
1105 data:
1106 failCommands: ["findAndModify"]
1107 errorCode: 91
1108 - name: findOneAndDelete
1109 object: collection
1110 arguments:
1111 session: session0
1112 filter: {_id: 1}
1113 result:
1114 errorLabelsContain: ["TransientTransactionError"]
1115 - *assertSessionUnpinned
1116 - *abortTransaction
1117 outcome: *outcome
1118
1119 - description: unpin after transient connection error on findOneAndUpdate findAndModify
1120 useMultipleMongoses: true
1121 operations:
1122 - *startTransaction
1123 - *initialCommand
1124 - name: targetedFailPoint
1125 object: testRunner
1126 arguments:
1127 session: session0
1128 failPoint:
1129 configureFailPoint: failCommand
1130 mode: {times: 1}
1131 data:
1132 failCommands: ["findAndModify"]
1133 closeConnection: true
1134 - name: findOneAndUpdate
1135 object: collection
1136 arguments:
1137 session: session0
1138 filter: {_id: 1}
1139 update: {$inc: {x: 1}}
1140 returnDocument: Before
1141 result:
1142 errorLabelsContain: ["TransientTransactionError"]
1143 - *assertSessionUnpinned
1144 - *abortTransaction
1145 outcome: *outcome
1146
1147 - description: unpin after transient ShutdownInProgress error on findOneAndUpdate findAndModify
1148 useMultipleMongoses: true
1149 operations:
1150 - *startTransaction
1151 - *initialCommand
1152 - name: targetedFailPoint
1153 object: testRunner
1154 arguments:
1155 session: session0
1156 failPoint:
1157 configureFailPoint: failCommand
1158 mode: {times: 1}
1159 data:
1160 failCommands: ["findAndModify"]
1161 errorCode: 91
1162 - name: findOneAndUpdate
1163 object: collection
1164 arguments:
1165 session: session0
1166 filter: {_id: 1}
1167 update: {$inc: {x: 1}}
1168 returnDocument: Before
1169 result:
1170 errorLabelsContain: ["TransientTransactionError"]
1171 - *assertSessionUnpinned
1172 - *abortTransaction
1173 outcome: *outcome
1174
1175 - description: unpin after transient connection error on findOneAndReplace findAndModify
1176 useMultipleMongoses: true
1177 operations:
1178 - *startTransaction
1179 - *initialCommand
1180 - name: targetedFailPoint
1181 object: testRunner
1182 arguments:
1183 session: session0
1184 failPoint:
1185 configureFailPoint: failCommand
1186 mode: {times: 1}
1187 data:
1188 failCommands: ["findAndModify"]
1189 closeConnection: true
1190 - name: findOneAndReplace
1191 object: collection
1192 arguments:
1193 session: session0
1194 filter: {_id: 1}
1195 replacement: {y: 1}
1196 returnDocument: Before
1197 result:
1198 errorLabelsContain: ["TransientTransactionError"]
1199 - *assertSessionUnpinned
1200 - *abortTransaction
1201 outcome: *outcome
1202
1203 - description: unpin after transient ShutdownInProgress error on findOneAndReplace findAndModify
1204 useMultipleMongoses: true
1205 operations:
1206 - *startTransaction
1207 - *initialCommand
1208 - name: targetedFailPoint
1209 object: testRunner
1210 arguments:
1211 session: session0
1212 failPoint:
1213 configureFailPoint: failCommand
1214 mode: {times: 1}
1215 data:
1216 failCommands: ["findAndModify"]
1217 errorCode: 91
1218 - name: findOneAndReplace
1219 object: collection
1220 arguments:
1221 session: session0
1222 filter: {_id: 1}
1223 replacement: {y: 1}
1224 returnDocument: Before
1225 result:
1226 errorLabelsContain: ["TransientTransactionError"]
1227 - *assertSessionUnpinned
1228 - *abortTransaction
1229 outcome: *outcome
1230
1231 - description: unpin after transient connection error on bulkWrite insert
1232 useMultipleMongoses: true
1233 operations:
1234 - *startTransaction
1235 - *initialCommand
1236 - name: targetedFailPoint
1237 object: testRunner
1238 arguments:
1239 session: session0
1240 failPoint:
1241 configureFailPoint: failCommand
1242 mode: {times: 1}
1243 data:
1244 failCommands: ["insert"]
1245 closeConnection: true
1246 - name: bulkWrite
1247 object: collection
1248 arguments:
1249 session: session0
1250 requests:
1251 - name: insertOne
1252 arguments:
1253 document: {_id: 1}
1254 result:
1255 errorLabelsContain: ["TransientTransactionError"]
1256 - *assertSessionUnpinned
1257 - *abortTransaction
1258 outcome: *outcome
1259
1260 - description: unpin after transient ShutdownInProgress error on bulkWrite insert
1261 useMultipleMongoses: true
1262 operations:
1263 - *startTransaction
1264 - *initialCommand
1265 - name: targetedFailPoint
1266 object: testRunner
1267 arguments:
1268 session: session0
1269 failPoint:
1270 configureFailPoint: failCommand
1271 mode: {times: 1}
1272 data:
1273 failCommands: ["insert"]
1274 errorCode: 91
1275 - name: bulkWrite
1276 object: collection
1277 arguments:
1278 session: session0
1279 requests:
1280 - name: insertOne
1281 arguments:
1282 document: {_id: 1}
1283 result:
1284 errorLabelsContain: ["TransientTransactionError"]
1285 - *assertSessionUnpinned
1286 - *abortTransaction
1287 outcome: *outcome
1288
1289 - description: unpin after transient connection error on bulkWrite update
1290 useMultipleMongoses: true
1291 operations:
1292 - *startTransaction
1293 - *initialCommand
1294 - name: targetedFailPoint
1295 object: testRunner
1296 arguments:
1297 session: session0
1298 failPoint:
1299 configureFailPoint: failCommand
1300 mode: {times: 1}
1301 data:
1302 failCommands: ["update"]
1303 closeConnection: true
1304 - name: bulkWrite
1305 object: collection
1306 arguments:
1307 session: session0
1308 requests:
1309 - name: updateOne
1310 arguments:
1311 filter: {_id: 1}
1312 update: {$set: {x: 1}}
1313 result:
1314 errorLabelsContain: ["TransientTransactionError"]
1315 - *assertSessionUnpinned
1316 - *abortTransaction
1317 outcome: *outcome
1318
1319 - description: unpin after transient ShutdownInProgress error on bulkWrite update
1320 useMultipleMongoses: true
1321 operations:
1322 - *startTransaction
1323 - *initialCommand
1324 - name: targetedFailPoint
1325 object: testRunner
1326 arguments:
1327 session: session0
1328 failPoint:
1329 configureFailPoint: failCommand
1330 mode: {times: 1}
1331 data:
1332 failCommands: ["update"]
1333 errorCode: 91
1334 - name: bulkWrite
1335 object: collection
1336 arguments:
1337 session: session0
1338 requests:
1339 - name: updateOne
1340 arguments:
1341 filter: {_id: 1}
1342 update: {$set: {x: 1}}
1343 result:
1344 errorLabelsContain: ["TransientTransactionError"]
1345 - *assertSessionUnpinned
1346 - *abortTransaction
1347 outcome: *outcome
1348
1349 - description: unpin after transient connection error on bulkWrite delete
1350 useMultipleMongoses: true
1351 operations:
1352 - *startTransaction
1353 - *initialCommand
1354 - name: targetedFailPoint
1355 object: testRunner
1356 arguments:
1357 session: session0
1358 failPoint:
1359 configureFailPoint: failCommand
1360 mode: {times: 1}
1361 data:
1362 failCommands: ["delete"]
1363 closeConnection: true
1364 - name: bulkWrite
1365 object: collection
1366 arguments:
1367 session: session0
1368 requests:
1369 - name: deleteOne
1370 arguments:
1371 filter: {_id: 1}
1372 result:
1373 errorLabelsContain: ["TransientTransactionError"]
1374 - *assertSessionUnpinned
1375 - *abortTransaction
1376 outcome: *outcome
1377
1378 - description: unpin after transient ShutdownInProgress error on bulkWrite delete
1379 useMultipleMongoses: true
1380 operations:
1381 - *startTransaction
1382 - *initialCommand
1383 - name: targetedFailPoint
1384 object: testRunner
1385 arguments:
1386 session: session0
1387 failPoint:
1388 configureFailPoint: failCommand
1389 mode: {times: 1}
1390 data:
1391 failCommands: ["delete"]
1392 errorCode: 91
1393 - name: bulkWrite
1394 object: collection
1395 arguments:
1396 session: session0
1397 requests:
1398 - name: deleteOne
1399 arguments:
1400 filter: {_id: 1}
1401 result:
1402 errorLabelsContain: ["TransientTransactionError"]
1403 - *assertSessionUnpinned
1404 - *abortTransaction
1405 outcome: *outcome
1406
1407 - description: unpin after transient connection error on find find
1408 useMultipleMongoses: true
1409 operations:
1410 - *startTransaction
1411 - *initialCommand
1412 - name: targetedFailPoint
1413 object: testRunner
1414 arguments:
1415 session: session0
1416 failPoint:
1417 configureFailPoint: failCommand
1418 mode: {times: 1}
1419 data:
1420 failCommands: ["find"]
1421 closeConnection: true
1422 - name: find
1423 object: collection
1424 arguments:
1425 session: session0
1426 filter: {_id: 1}
1427 result:
1428 errorLabelsContain: ["TransientTransactionError"]
1429 - *assertSessionUnpinned
1430 - *abortTransaction
1431 outcome: *outcome
1432
1433 - description: unpin after transient ShutdownInProgress error on find find
1434 useMultipleMongoses: true
1435 operations:
1436 - *startTransaction
1437 - *initialCommand
1438 - name: targetedFailPoint
1439 object: testRunner
1440 arguments:
1441 session: session0
1442 failPoint:
1443 configureFailPoint: failCommand
1444 mode: {times: 1}
1445 data:
1446 failCommands: ["find"]
1447 errorCode: 91
1448 - name: find
1449 object: collection
1450 arguments:
1451 session: session0
1452 filter: {_id: 1}
1453 result:
1454 errorLabelsContain: ["TransientTransactionError"]
1455 - *assertSessionUnpinned
1456 - *abortTransaction
1457 outcome: *outcome
1458
1459 - description: unpin after transient connection error on countDocuments aggregate
1460 useMultipleMongoses: true
1461 operations:
1462 - *startTransaction
1463 - *initialCommand
1464 - name: targetedFailPoint
1465 object: testRunner
1466 arguments:
1467 session: session0
1468 failPoint:
1469 configureFailPoint: failCommand
1470 mode: {times: 1}
1471 data:
1472 failCommands: ["aggregate"]
1473 closeConnection: true
1474 - name: countDocuments
1475 object: collection
1476 arguments:
1477 session: session0
1478 filter: {}
1479 result:
1480 errorLabelsContain: ["TransientTransactionError"]
1481 - *assertSessionUnpinned
1482 - *abortTransaction
1483 outcome: *outcome
1484
1485 - description: unpin after transient ShutdownInProgress error on countDocuments aggregate
1486 useMultipleMongoses: true
1487 operations:
1488 - *startTransaction
1489 - *initialCommand
1490 - name: targetedFailPoint
1491 object: testRunner
1492 arguments:
1493 session: session0
1494 failPoint:
1495 configureFailPoint: failCommand
1496 mode: {times: 1}
1497 data:
1498 failCommands: ["aggregate"]
1499 errorCode: 91
1500 - name: countDocuments
1501 object: collection
1502 arguments:
1503 session: session0
1504 filter: {}
1505 result:
1506 errorLabelsContain: ["TransientTransactionError"]
1507 - *assertSessionUnpinned
1508 - *abortTransaction
1509 outcome: *outcome
1510
1511 - description: unpin after transient connection error on aggregate aggregate
1512 useMultipleMongoses: true
1513 operations:
1514 - *startTransaction
1515 - *initialCommand
1516 - name: targetedFailPoint
1517 object: testRunner
1518 arguments:
1519 session: session0
1520 failPoint:
1521 configureFailPoint: failCommand
1522 mode: {times: 1}
1523 data:
1524 failCommands: ["aggregate"]
1525 closeConnection: true
1526 - name: aggregate
1527 object: collection
1528 arguments:
1529 session: session0
1530 pipeline: []
1531 result:
1532 errorLabelsContain: ["TransientTransactionError"]
1533 - *assertSessionUnpinned
1534 - *abortTransaction
1535 outcome: *outcome
1536
1537 - description: unpin after transient ShutdownInProgress error on aggregate aggregate
1538 useMultipleMongoses: true
1539 operations:
1540 - *startTransaction
1541 - *initialCommand
1542 - name: targetedFailPoint
1543 object: testRunner
1544 arguments:
1545 session: session0
1546 failPoint:
1547 configureFailPoint: failCommand
1548 mode: {times: 1}
1549 data:
1550 failCommands: ["aggregate"]
1551 errorCode: 91
1552 - name: aggregate
1553 object: collection
1554 arguments:
1555 session: session0
1556 pipeline: []
1557 result:
1558 errorLabelsContain: ["TransientTransactionError"]
1559 - *assertSessionUnpinned
1560 - *abortTransaction
1561 outcome: *outcome
1562
1563 - description: unpin after transient connection error on distinct distinct
1564 useMultipleMongoses: true
1565 operations:
1566 - *startTransaction
1567 - *initialCommand
1568 - name: targetedFailPoint
1569 object: testRunner
1570 arguments:
1571 session: session0
1572 failPoint:
1573 configureFailPoint: failCommand
1574 mode: {times: 1}
1575 data:
1576 failCommands: ["distinct"]
1577 closeConnection: true
1578 - name: distinct
1579 object: collection
1580 arguments:
1581 session: session0
1582 fieldName: _id
1583 result:
1584 errorLabelsContain: ["TransientTransactionError"]
1585 - *assertSessionUnpinned
1586 - *abortTransaction
1587 outcome: *outcome
1588
1589 - description: unpin after transient ShutdownInProgress error on distinct distinct
1590 useMultipleMongoses: true
1591 operations:
1592 - *startTransaction
1593 - *initialCommand
1594 - name: targetedFailPoint
1595 object: testRunner
1596 arguments:
1597 session: session0
1598 failPoint:
1599 configureFailPoint: failCommand
1600 mode: {times: 1}
1601 data:
1602 failCommands: ["distinct"]
1603 errorCode: 91
1604 - name: distinct
1605 object: collection
1606 arguments:
1607 session: session0
1608 fieldName: _id
1609 result:
1610 errorLabelsContain: ["TransientTransactionError"]
1611 - *assertSessionUnpinned
1612 - *abortTransaction
1613 outcome: *outcome
1614
1615 - description: unpin after transient connection error on runCommand insert
1616 useMultipleMongoses: true
1617 operations:
1618 - *startTransaction
1619 - *initialCommand
1620 - name: targetedFailPoint
1621 object: testRunner
1622 arguments:
1623 session: session0
1624 failPoint:
1625 configureFailPoint: failCommand
1626 mode: {times: 1}
1627 data:
1628 failCommands: ["insert"]
1629 closeConnection: true
1630 - name: runCommand
1631 object: database
1632 command_name: insert
1633 arguments:
1634 session: session0
1635 command:
1636 insert: *collection_name
1637 documents:
1638 - _id : 1
1639 result:
1640 errorLabelsContain: ["TransientTransactionError"]
1641 - *assertSessionUnpinned
1642 - *abortTransaction
1643 outcome: *outcome
1644
1645 - description: unpin after transient ShutdownInProgress error on runCommand insert
1646 useMultipleMongoses: true
1647 operations:
1648 - *startTransaction
1649 - *initialCommand
1650 - name: targetedFailPoint
1651 object: testRunner
1652 arguments:
1653 session: session0
1654 failPoint:
1655 configureFailPoint: failCommand
1656 mode: {times: 1}
1657 data:
1658 failCommands: ["insert"]
1659 errorCode: 91
1660 - name: runCommand
1661 object: database
1662 command_name: insert
1663 arguments:
1664 session: session0
1665 command:
1666 insert: *collection_name
1667 documents:
1668 - _id : 1
1669 result:
1670 errorLabelsContain: ["TransientTransactionError"]
1671 - *assertSessionUnpinned
1672 - *abortTransaction
1673 outcome: *outcome
1674