Debian Codegraph @

testdata/transactions/legacy/pin-mongos.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 {
15 "_id": 1
16 },
17 {
18 "_id": 2
19 }
20 ],
21 "tests": [
22 {
23 "description": "countDocuments",
24 "useMultipleMongoses": true,
25 "operations": [
26 {
27 "name": "startTransaction",
28 "object": "session0"
29 },
30 {
31 "name": "countDocuments",
32 "object": "collection",
33 "arguments": {
34 "filter": {
35 "_id": 2
36 },
37 "session": "session0"
38 },
39 "result": 1
40 },
41 {
42 "name": "countDocuments",
43 "object": "collection",
44 "arguments": {
45 "filter": {
46 "_id": 2
47 },
48 "session": "session0"
49 },
50 "result": 1
51 },
52 {
53 "name": "countDocuments",
54 "object": "collection",
55 "arguments": {
56 "filter": {
57 "_id": 2
58 },
59 "session": "session0"
60 },
61 "result": 1
62 },
63 {
64 "name": "countDocuments",
65 "object": "collection",
66 "arguments": {
67 "filter": {
68 "_id": 2
69 },
70 "session": "session0"
71 },
72 "result": 1
73 },
74 {
75 "name": "countDocuments",
76 "object": "collection",
77 "arguments": {
78 "filter": {
79 "_id": 2
80 },
81 "session": "session0"
82 },
83 "result": 1
84 },
85 {
86 "name": "countDocuments",
87 "object": "collection",
88 "arguments": {
89 "filter": {
90 "_id": 2
91 },
92 "session": "session0"
93 },
94 "result": 1
95 },
96 {
97 "name": "countDocuments",
98 "object": "collection",
99 "arguments": {
100 "filter": {
101 "_id": 2
102 },
103 "session": "session0"
104 },
105 "result": 1
106 },
107 {
108 "name": "countDocuments",
109 "object": "collection",
110 "arguments": {
111 "filter": {
112 "_id": 2
113 },
114 "session": "session0"
115 },
116 "result": 1
117 },
118 {
119 "name": "commitTransaction",
120 "object": "session0"
121 }
122 ],
123 "outcome": {
124 "collection": {
125 "data": [
126 {
127 "_id": 1
128 },
129 {
130 "_id": 2
131 }
132 ]
133 }
134 }
135 },
136 {
137 "description": "distinct",
138 "useMultipleMongoses": true,
139 "operations": [
140 {
141 "name": "startTransaction",
142 "object": "session0"
143 },
144 {
145 "name": "distinct",
146 "object": "collection",
147 "arguments": {
148 "fieldName": "_id",
149 "session": "session0"
150 },
151 "result": [
152 1,
153 2
154 ]
155 },
156 {
157 "name": "distinct",
158 "object": "collection",
159 "arguments": {
160 "fieldName": "_id",
161 "session": "session0"
162 },
163 "result": [
164 1,
165 2
166 ]
167 },
168 {
169 "name": "distinct",
170 "object": "collection",
171 "arguments": {
172 "fieldName": "_id",
173 "session": "session0"
174 },
175 "result": [
176 1,
177 2
178 ]
179 },
180 {
181 "name": "distinct",
182 "object": "collection",
183 "arguments": {
184 "fieldName": "_id",
185 "session": "session0"
186 },
187 "result": [
188 1,
189 2
190 ]
191 },
192 {
193 "name": "distinct",
194 "object": "collection",
195 "arguments": {
196 "fieldName": "_id",
197 "session": "session0"
198 },
199 "result": [
200 1,
201 2
202 ]
203 },
204 {
205 "name": "distinct",
206 "object": "collection",
207 "arguments": {
208 "fieldName": "_id",
209 "session": "session0"
210 },
211 "result": [
212 1,
213 2
214 ]
215 },
216 {
217 "name": "distinct",
218 "object": "collection",
219 "arguments": {
220 "fieldName": "_id",
221 "session": "session0"
222 },
223 "result": [
224 1,
225 2
226 ]
227 },
228 {
229 "name": "distinct",
230 "object": "collection",
231 "arguments": {
232 "fieldName": "_id",
233 "session": "session0"
234 },
235 "result": [
236 1,
237 2
238 ]
239 },
240 {
241 "name": "commitTransaction",
242 "object": "session0"
243 }
244 ],
245 "outcome": {
246 "collection": {
247 "data": [
248 {
249 "_id": 1
250 },
251 {
252 "_id": 2
253 }
254 ]
255 }
256 }
257 },
258 {
259 "description": "find",
260 "useMultipleMongoses": true,
261 "operations": [
262 {
263 "name": "startTransaction",
264 "object": "session0"
265 },
266 {
267 "name": "find",
268 "object": "collection",
269 "arguments": {
270 "filter": {
271 "_id": 2
272 },
273 "session": "session0"
274 },
275 "result": [
276 {
277 "_id": 2
278 }
279 ]
280 },
281 {
282 "name": "find",
283 "object": "collection",
284 "arguments": {
285 "filter": {
286 "_id": 2
287 },
288 "session": "session0"
289 },
290 "result": [
291 {
292 "_id": 2
293 }
294 ]
295 },
296 {
297 "name": "find",
298 "object": "collection",
299 "arguments": {
300 "filter": {
301 "_id": 2
302 },
303 "session": "session0"
304 },
305 "result": [
306 {
307 "_id": 2
308 }
309 ]
310 },
311 {
312 "name": "find",
313 "object": "collection",
314 "arguments": {
315 "filter": {
316 "_id": 2
317 },
318 "session": "session0"
319 },
320 "result": [
321 {
322 "_id": 2
323 }
324 ]
325 },
326 {
327 "name": "find",
328 "object": "collection",
329 "arguments": {
330 "filter": {
331 "_id": 2
332 },
333 "session": "session0"
334 },
335 "result": [
336 {
337 "_id": 2
338 }
339 ]
340 },
341 {
342 "name": "find",
343 "object": "collection",
344 "arguments": {
345 "filter": {
346 "_id": 2
347 },
348 "session": "session0"
349 },
350 "result": [
351 {
352 "_id": 2
353 }
354 ]
355 },
356 {
357 "name": "find",
358 "object": "collection",
359 "arguments": {
360 "filter": {
361 "_id": 2
362 },
363 "session": "session0"
364 },
365 "result": [
366 {
367 "_id": 2
368 }
369 ]
370 },
371 {
372 "name": "find",
373 "object": "collection",
374 "arguments": {
375 "filter": {
376 "_id": 2
377 },
378 "session": "session0"
379 },
380 "result": [
381 {
382 "_id": 2
383 }
384 ]
385 },
386 {
387 "name": "commitTransaction",
388 "object": "session0"
389 }
390 ],
391 "outcome": {
392 "collection": {
393 "data": [
394 {
395 "_id": 1
396 },
397 {
398 "_id": 2
399 }
400 ]
401 }
402 }
403 },
404 {
405 "description": "insertOne",
406 "useMultipleMongoses": true,
407 "operations": [
408 {
409 "name": "startTransaction",
410 "object": "session0"
411 },
412 {
413 "name": "insertOne",
414 "object": "collection",
415 "arguments": {
416 "document": {
417 "_id": 3
418 },
419 "session": "session0"
420 },
421 "result": {
422 "insertedId": 3
423 }
424 },
425 {
426 "name": "insertOne",
427 "object": "collection",
428 "arguments": {
429 "document": {
430 "_id": 4
431 },
432 "session": "session0"
433 },
434 "result": {
435 "insertedId": 4
436 }
437 },
438 {
439 "name": "insertOne",
440 "object": "collection",
441 "arguments": {
442 "document": {
443 "_id": 5
444 },
445 "session": "session0"
446 },
447 "result": {
448 "insertedId": 5
449 }
450 },
451 {
452 "name": "insertOne",
453 "object": "collection",
454 "arguments": {
455 "document": {
456 "_id": 6
457 },
458 "session": "session0"
459 },
460 "result": {
461 "insertedId": 6
462 }
463 },
464 {
465 "name": "insertOne",
466 "object": "collection",
467 "arguments": {
468 "document": {
469 "_id": 7
470 },
471 "session": "session0"
472 },
473 "result": {
474 "insertedId": 7
475 }
476 },
477 {
478 "name": "insertOne",
479 "object": "collection",
480 "arguments": {
481 "document": {
482 "_id": 8
483 },
484 "session": "session0"
485 },
486 "result": {
487 "insertedId": 8
488 }
489 },
490 {
491 "name": "insertOne",
492 "object": "collection",
493 "arguments": {
494 "document": {
495 "_id": 9
496 },
497 "session": "session0"
498 },
499 "result": {
500 "insertedId": 9
501 }
502 },
503 {
504 "name": "insertOne",
505 "object": "collection",
506 "arguments": {
507 "document": {
508 "_id": 10
509 },
510 "session": "session0"
511 },
512 "result": {
513 "insertedId": 10
514 }
515 },
516 {
517 "name": "commitTransaction",
518 "object": "session0"
519 }
520 ],
521 "outcome": {
522 "collection": {
523 "data": [
524 {
525 "_id": 1
526 },
527 {
528 "_id": 2
529 },
530 {
531 "_id": 3
532 },
533 {
534 "_id": 4
535 },
536 {
537 "_id": 5
538 },
539 {
540 "_id": 6
541 },
542 {
543 "_id": 7
544 },
545 {
546 "_id": 8
547 },
548 {
549 "_id": 9
550 },
551 {
552 "_id": 10
553 }
554 ]
555 }
556 }
557 },
558 {
559 "description": "mixed read write operations",
560 "useMultipleMongoses": true,
561 "operations": [
562 {
563 "name": "startTransaction",
564 "object": "session0"
565 },
566 {
567 "name": "insertOne",
568 "object": "collection",
569 "arguments": {
570 "document": {
571 "_id": 3
572 },
573 "session": "session0"
574 },
575 "result": {
576 "insertedId": 3
577 }
578 },
579 {
580 "name": "countDocuments",
581 "object": "collection",
582 "arguments": {
583 "filter": {
584 "_id": 3
585 },
586 "session": "session0"
587 },
588 "result": 1
589 },
590 {
591 "name": "countDocuments",
592 "object": "collection",
593 "arguments": {
594 "filter": {
595 "_id": 3
596 },
597 "session": "session0"
598 },
599 "result": 1
600 },
601 {
602 "name": "countDocuments",
603 "object": "collection",
604 "arguments": {
605 "filter": {
606 "_id": 3
607 },
608 "session": "session0"
609 },
610 "result": 1
611 },
612 {
613 "name": "countDocuments",
614 "object": "collection",
615 "arguments": {
616 "filter": {
617 "_id": 3
618 },
619 "session": "session0"
620 },
621 "result": 1
622 },
623 {
624 "name": "countDocuments",
625 "object": "collection",
626 "arguments": {
627 "filter": {
628 "_id": 3
629 },
630 "session": "session0"
631 },
632 "result": 1
633 },
634 {
635 "name": "insertOne",
636 "object": "collection",
637 "arguments": {
638 "document": {
639 "_id": 4
640 },
641 "session": "session0"
642 },
643 "result": {
644 "insertedId": 4
645 }
646 },
647 {
648 "name": "insertOne",
649 "object": "collection",
650 "arguments": {
651 "document": {
652 "_id": 5
653 },
654 "session": "session0"
655 },
656 "result": {
657 "insertedId": 5
658 }
659 },
660 {
661 "name": "insertOne",
662 "object": "collection",
663 "arguments": {
664 "document": {
665 "_id": 6
666 },
667 "session": "session0"
668 },
669 "result": {
670 "insertedId": 6
671 }
672 },
673 {
674 "name": "insertOne",
675 "object": "collection",
676 "arguments": {
677 "document": {
678 "_id": 7
679 },
680 "session": "session0"
681 },
682 "result": {
683 "insertedId": 7
684 }
685 },
686 {
687 "name": "commitTransaction",
688 "object": "session0"
689 }
690 ],
691 "outcome": {
692 "collection": {
693 "data": [
694 {
695 "_id": 1
696 },
697 {
698 "_id": 2
699 },
700 {
701 "_id": 3
702 },
703 {
704 "_id": 4
705 },
706 {
707 "_id": 5
708 },
709 {
710 "_id": 6
711 },
712 {
713 "_id": 7
714 }
715 ]
716 }
717 }
718 },
719 {
720 "description": "multiple commits",
721 "useMultipleMongoses": true,
722 "operations": [
723 {
724 "name": "startTransaction",
725 "object": "session0"
726 },
727 {
728 "name": "insertMany",
729 "object": "collection",
730 "arguments": {
731 "documents": [
732 {
733 "_id": 3
734 },
735 {
736 "_id": 4
737 }
738 ],
739 "session": "session0"
740 },
741 "result": {
742 "insertedIds": {
743 "0": 3,
744 "1": 4
745 }
746 }
747 },
748 {
749 "name": "assertSessionPinned",
750 "object": "testRunner",
751 "arguments": {
752 "session": "session0"
753 }
754 },
755 {
756 "name": "commitTransaction",
757 "object": "session0"
758 },
759 {
760 "name": "assertSessionPinned",
761 "object": "testRunner",
762 "arguments": {
763 "session": "session0"
764 }
765 },
766 {
767 "name": "commitTransaction",
768 "object": "session0"
769 },
770 {
771 "name": "commitTransaction",
772 "object": "session0"
773 },
774 {
775 "name": "commitTransaction",
776 "object": "session0"
777 },
778 {
779 "name": "commitTransaction",
780 "object": "session0"
781 },
782 {
783 "name": "commitTransaction",
784 "object": "session0"
785 },
786 {
787 "name": "commitTransaction",
788 "object": "session0"
789 },
790 {
791 "name": "commitTransaction",
792 "object": "session0"
793 },
794 {
795 "name": "commitTransaction",
796 "object": "session0"
797 },
798 {
799 "name": "commitTransaction",
800 "object": "session0"
801 },
802 {
803 "name": "assertSessionPinned",
804 "object": "testRunner",
805 "arguments": {
806 "session": "session0"
807 }
808 }
809 ],
810 "outcome": {
811 "collection": {
812 "data": [
813 {
814 "_id": 1
815 },
816 {
817 "_id": 2
818 },
819 {
820 "_id": 3
821 },
822 {
823 "_id": 4
824 }
825 ]
826 }
827 }
828 },
829 {
830 "description": "remain pinned after non-transient error on commit",
831 "useMultipleMongoses": true,
832 "operations": [
833 {
834 "name": "startTransaction",
835 "object": "session0"
836 },
837 {
838 "name": "insertMany",
839 "object": "collection",
840 "arguments": {
841 "documents": [
842 {
843 "_id": 3
844 },
845 {
846 "_id": 4
847 }
848 ],
849 "session": "session0"
850 },
851 "result": {
852 "insertedIds": {
853 "0": 3,
854 "1": 4
855 }
856 }
857 },
858 {
859 "name": "assertSessionPinned",
860 "object": "testRunner",
861 "arguments": {
862 "session": "session0"
863 }
864 },
865 {
866 "name": "targetedFailPoint",
867 "object": "testRunner",
868 "arguments": {
869 "session": "session0",
870 "failPoint": {
871 "configureFailPoint": "failCommand",
872 "mode": {
873 "times": 1
874 },
875 "data": {
876 "failCommands": [
877 "commitTransaction"
878 ],
879 "errorCode": 51
880 }
881 }
882 }
883 },
884 {
885 "name": "commitTransaction",
886 "object": "session0",
887 "result": {
888 "errorLabelsOmit": [
889 "TransientTransactionError"
890 ],
891 "errorCode": 51
892 }
893 },
894 {
895 "name": "assertSessionPinned",
896 "object": "testRunner",
897 "arguments": {
898 "session": "session0"
899 }
900 },
901 {
902 "name": "commitTransaction",
903 "object": "session0"
904 },
905 {
906 "name": "assertSessionPinned",
907 "object": "testRunner",
908 "arguments": {
909 "session": "session0"
910 }
911 }
912 ],
913 "outcome": {
914 "collection": {
915 "data": [
916 {
917 "_id": 1
918 },
919 {
920 "_id": 2
921 },
922 {
923 "_id": 3
924 },
925 {
926 "_id": 4
927 }
928 ]
929 }
930 }
931 },
932 {
933 "description": "unpin after transient error within a transaction",
934 "useMultipleMongoses": true,
935 "operations": [
936 {
937 "name": "startTransaction",
938 "object": "session0"
939 },
940 {
941 "name": "insertOne",
942 "object": "collection",
943 "arguments": {
944 "session": "session0",
945 "document": {
946 "_id": 3
947 }
948 },
949 "result": {
950 "insertedId": 3
951 }
952 },
953 {
954 "name": "targetedFailPoint",
955 "object": "testRunner",
956 "arguments": {
957 "session": "session0",
958 "failPoint": {
959 "configureFailPoint": "failCommand",
960 "mode": {
961 "times": 1
962 },
963 "data": {
964 "failCommands": [
965 "insert"
966 ],
967 "closeConnection": true
968 }
969 }
970 }
971 },
972 {
973 "name": "insertOne",
974 "object": "collection",
975 "arguments": {
976 "session": "session0",
977 "document": {
978 "_id": 4
979 }
980 },
981 "result": {
982 "errorLabelsContain": [
983 "TransientTransactionError"
984 ],
985 "errorLabelsOmit": [
986 "UnknownTransactionCommitResult"
987 ]
988 }
989 },
990 {
991 "name": "abortTransaction",
992 "object": "session0"
993 }
994 ],
995 "expectations": [
996 {
997 "command_started_event": {
998 "command": {
999 "insert": "test",
1000 "documents": [
1001 {
1002 "_id": 3
1003 }
1004 ],
1005 "ordered": true,
1006 "readConcern": null,
1007 "lsid": "session0",
1008 "txnNumber": {
1009 "$numberLong": "1"
1010 },
1011 "startTransaction": true,
1012 "autocommit": false,
1013 "writeConcern": null
1014 },
1015 "command_name": "insert",
1016 "database_name": "transaction-tests"
1017 }
1018 },
1019 {
1020 "command_started_event": {
1021 "command": {
1022 "insert": "test",
1023 "documents": [
1024 {
1025 "_id": 4
1026 }
1027 ],
1028 "ordered": true,
1029 "readConcern": null,
1030 "lsid": "session0",
1031 "txnNumber": {
1032 "$numberLong": "1"
1033 },
1034 "startTransaction": null,
1035 "autocommit": false,
1036 "writeConcern": null
1037 },
1038 "command_name": "insert",
1039 "database_name": "transaction-tests"
1040 }
1041 },
1042 {
1043 "command_started_event": {
1044 "command": {
1045 "abortTransaction": 1,
1046 "lsid": "session0",
1047 "txnNumber": {
1048 "$numberLong": "1"
1049 },
1050 "startTransaction": null,
1051 "autocommit": false,
1052 "writeConcern": null,
1053 "recoveryToken": 42
1054 },
1055 "command_name": "abortTransaction",
1056 "database_name": "admin"
1057 }
1058 }
1059 ],
1060 "outcome": {
1061 "collection": {
1062 "data": [
1063 {
1064 "_id": 1
1065 },
1066 {
1067 "_id": 2
1068 }
1069 ]
1070 }
1071 }
1072 },
1073 {
1074 "description": "unpin after transient error within a transaction and commit",
1075 "useMultipleMongoses": true,
1076 "clientOptions": {
1077 "heartbeatFrequencyMS": 30000
1078 },
1079 "operations": [
1080 {
1081 "name": "startTransaction",
1082 "object": "session0"
1083 },
1084 {
1085 "name": "insertOne",
1086 "object": "collection",
1087 "arguments": {
1088 "session": "session0",
1089 "document": {
1090 "_id": 3
1091 }
1092 },
1093 "result": {
1094 "insertedId": 3
1095 }
1096 },
1097 {
1098 "name": "targetedFailPoint",
1099 "object": "testRunner",
1100 "arguments": {
1101 "session": "session0",
1102 "failPoint": {
1103 "configureFailPoint": "failCommand",
1104 "mode": {
1105 "times": 7
1106 },
1107 "data": {
1108 "failCommands": [
1109 "insert",
1110 "isMaster",
1111 "hello"
1112 ],
1113 "closeConnection": true
1114 }
1115 }
1116 }
1117 },
1118 {
1119 "name": "insertOne",
1120 "object": "collection",
1121 "arguments": {
1122 "session": "session0",
1123 "document": {
1124 "_id": 4
1125 }
1126 },
1127 "result": {
1128 "errorLabelsContain": [
1129 "TransientTransactionError"
1130 ],
1131 "errorLabelsOmit": [
1132 "UnknownTransactionCommitResult"
1133 ]
1134 }
1135 },
1136 {
1137 "name": "commitTransaction",
1138 "object": "session0",
1139 "result": {
1140 "errorLabelsContain": [
1141 "TransientTransactionError"
1142 ],
1143 "errorLabelsOmit": [
1144 "UnknownTransactionCommitResult"
1145 ],
1146 "errorCodeName": "NoSuchTransaction"
1147 }
1148 }
1149 ],
1150 "expectations": [
1151 {
1152 "command_started_event": {
1153 "command": {
1154 "insert": "test",
1155 "documents": [
1156 {
1157 "_id": 3
1158 }
1159 ],
1160 "ordered": true,
1161 "readConcern": null,
1162 "lsid": "session0",
1163 "txnNumber": {
1164 "$numberLong": "1"
1165 },
1166 "startTransaction": true,
1167 "autocommit": false,
1168 "writeConcern": null
1169 },
1170 "command_name": "insert",
1171 "database_name": "transaction-tests"
1172 }
1173 },
1174 {
1175 "command_started_event": {
1176 "command": {
1177 "insert": "test",
1178 "documents": [
1179 {
1180 "_id": 4
1181 }
1182 ],
1183 "ordered": true,
1184 "readConcern": null,
1185 "lsid": "session0",
1186 "txnNumber": {
1187 "$numberLong": "1"
1188 },
1189 "startTransaction": null,
1190 "autocommit": false,
1191 "writeConcern": null
1192 },
1193 "command_name": "insert",
1194 "database_name": "transaction-tests"
1195 }
1196 },
1197 {
1198 "command_started_event": {
1199 "command": {
1200 "commitTransaction": 1,
1201 "lsid": "session0",
1202 "txnNumber": {
1203 "$numberLong": "1"
1204 },
1205 "startTransaction": null,
1206 "autocommit": false,
1207 "writeConcern": null,
1208 "recoveryToken": 42
1209 },
1210 "command_name": "commitTransaction",
1211 "database_name": "admin"
1212 }
1213 }
1214 ],
1215 "outcome": {
1216 "collection": {
1217 "data": [
1218 {
1219 "_id": 1
1220 },
1221 {
1222 "_id": 2
1223 }
1224 ]
1225 }
1226 }
1227 }
1228 ]
1229 }