Debian Codegraph @

testdata/transactions/legacy/read-concern.json

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