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  "tests": [
20    {
21      "description": "commitTransaction fails after two errors",
22      "clientOptions": {
23        "retryWrites": false
24      },
25      "failPoint": {
26        "configureFailPoint": "failCommand",
27        "mode": {
28          "times": 2
29        },
30        "data": {
31          "failCommands": [
32            "commitTransaction"
33          ],
34          "closeConnection": true
35        }
36      },
37      "operations": [
38        {
39          "name": "startTransaction",
40          "object": "session0"
41        },
42        {
43          "name": "insertOne",
44          "object": "collection",
45          "arguments": {
46            "session": "session0",
47            "document": {
48              "_id": 1
49            }
50          },
51          "result": {
52            "insertedId": 1
53          }
54        },
55        {
56          "name": "commitTransaction",
57          "object": "session0",
58          "result": {
59            "errorLabelsContain": [
60              "RetryableWriteError",
61              "UnknownTransactionCommitResult"
62            ],
63            "errorLabelsOmit": [
64              "TransientTransactionError"
65            ]
66          }
67        },
68        {
69          "name": "commitTransaction",
70          "object": "session0"
71        }
72      ],
73      "expectations": [
74        {
75          "command_started_event": {
76            "command": {
77              "insert": "test",
78              "documents": [
79                {
80                  "_id": 1
81                }
82              ],
83              "ordered": true,
84              "readConcern": null,
85              "lsid": "session0",
86              "txnNumber": {
87                "$numberLong": "1"
88              },
89              "startTransaction": true,
90              "autocommit": false,
91              "writeConcern": null
92            },
93            "command_name": "insert",
94            "database_name": "transaction-tests"
95          }
96        },
97        {
98          "command_started_event": {
99            "command": {
100              "commitTransaction": 1,
101              "lsid": "session0",
102              "txnNumber": {
103                "$numberLong": "1"
104              },
105              "startTransaction": null,
106              "autocommit": false,
107              "writeConcern": null
108            },
109            "command_name": "commitTransaction",
110            "database_name": "admin"
111          }
112        },
113        {
114          "command_started_event": {
115            "command": {
116              "commitTransaction": 1,
117              "lsid": "session0",
118              "txnNumber": {
119                "$numberLong": "1"
120              },
121              "startTransaction": null,
122              "autocommit": false,
123              "writeConcern": {
124                "w": "majority",
125                "wtimeout": 10000
126              }
127            },
128            "command_name": "commitTransaction",
129            "database_name": "admin"
130          }
131        },
132        {
133          "command_started_event": {
134            "command": {
135              "commitTransaction": 1,
136              "lsid": "session0",
137              "txnNumber": {
138                "$numberLong": "1"
139              },
140              "startTransaction": null,
141              "autocommit": false,
142              "writeConcern": {
143                "w": "majority",
144                "wtimeout": 10000
145              }
146            },
147            "command_name": "commitTransaction",
148            "database_name": "admin"
149          }
150        }
151      ],
152      "outcome": {
153        "collection": {
154          "data": [
155            {
156              "_id": 1
157            }
158          ]
159        }
160      }
161    },
162    {
163      "description": "commitTransaction applies majority write concern on retries",
164      "clientOptions": {
165        "retryWrites": false
166      },
167      "failPoint": {
168        "configureFailPoint": "failCommand",
169        "mode": {
170          "times": 2
171        },
172        "data": {
173          "failCommands": [
174            "commitTransaction"
175          ],
176          "closeConnection": true
177        }
178      },
179      "operations": [
180        {
181          "name": "startTransaction",
182          "object": "session0",
183          "arguments": {
184            "options": {
185              "writeConcern": {
186                "w": 2,
187                "j": true,
188                "wtimeout": 5000
189              }
190            }
191          }
192        },
193        {
194          "name": "insertOne",
195          "object": "collection",
196          "arguments": {
197            "session": "session0",
198            "document": {
199              "_id": 1
200            }
201          },
202          "result": {
203            "insertedId": 1
204          }
205        },
206        {
207          "name": "commitTransaction",
208          "object": "session0",
209          "result": {
210            "errorLabelsContain": [
211              "RetryableWriteError",
212              "UnknownTransactionCommitResult"
213            ],
214            "errorLabelsOmit": [
215              "TransientTransactionError"
216            ]
217          }
218        },
219        {
220          "name": "commitTransaction",
221          "object": "session0"
222        }
223      ],
224      "expectations": [
225        {
226          "command_started_event": {
227            "command": {
228              "insert": "test",
229              "documents": [
230                {
231                  "_id": 1
232                }
233              ],
234              "ordered": true,
235              "readConcern": null,
236              "lsid": "session0",
237              "txnNumber": {
238                "$numberLong": "1"
239              },
240              "startTransaction": true,
241              "autocommit": false,
242              "writeConcern": null
243            },
244            "command_name": "insert",
245            "database_name": "transaction-tests"
246          }
247        },
248        {
249          "command_started_event": {
250            "command": {
251              "commitTransaction": 1,
252              "lsid": "session0",
253              "txnNumber": {
254                "$numberLong": "1"
255              },
256              "startTransaction": null,
257              "autocommit": false,
258              "writeConcern": {
259                "w": 2,
260                "j": true,
261                "wtimeout": 5000
262              }
263            },
264            "command_name": "commitTransaction",
265            "database_name": "admin"
266          }
267        },
268        {
269          "command_started_event": {
270            "command": {
271              "commitTransaction": 1,
272              "lsid": "session0",
273              "txnNumber": {
274                "$numberLong": "1"
275              },
276              "startTransaction": null,
277              "autocommit": false,
278              "writeConcern": {
279                "w": "majority",
280                "j": true,
281                "wtimeout": 5000
282              }
283            },
284            "command_name": "commitTransaction",
285            "database_name": "admin"
286          }
287        },
288        {
289          "command_started_event": {
290            "command": {
291              "commitTransaction": 1,
292              "lsid": "session0",
293              "txnNumber": {
294                "$numberLong": "1"
295              },
296              "startTransaction": null,
297              "autocommit": false,
298              "writeConcern": {
299                "w": "majority",
300                "j": true,
301                "wtimeout": 5000
302              }
303            },
304            "command_name": "commitTransaction",
305            "database_name": "admin"
306          }
307        }
308      ],
309      "outcome": {
310        "collection": {
311          "data": [
312            {
313              "_id": 1
314            }
315          ]
316        }
317      }
318    },
319    {
320      "description": "commitTransaction fails after Interrupted",
321      "failPoint": {
322        "configureFailPoint": "failCommand",
323        "mode": {
324          "times": 1
325        },
326        "data": {
327          "failCommands": [
328            "commitTransaction"
329          ],
330          "errorCode": 11601,
331          "closeConnection": false
332        }
333      },
334      "operations": [
335        {
336          "name": "startTransaction",
337          "object": "session0"
338        },
339        {
340          "name": "insertOne",
341          "object": "collection",
342          "arguments": {
343            "session": "session0",
344            "document": {
345              "_id": 1
346            }
347          },
348          "result": {
349            "insertedId": 1
350          }
351        },
352        {
353          "name": "commitTransaction",
354          "object": "session0",
355          "result": {
356            "errorCodeName": "Interrupted",
357            "errorLabelsOmit": [
358              "RetryableWriteError",
359              "TransientTransactionError",
360              "UnknownTransactionCommitResult"
361            ]
362          }
363        }
364      ],
365      "expectations": [
366        {
367          "command_started_event": {
368            "command": {
369              "insert": "test",
370              "documents": [
371                {
372                  "_id": 1
373                }
374              ],
375              "ordered": true,
376              "readConcern": null,
377              "lsid": "session0",
378              "txnNumber": {
379                "$numberLong": "1"
380              },
381              "startTransaction": true,
382              "autocommit": false,
383              "writeConcern": null
384            },
385            "command_name": "insert",
386            "database_name": "transaction-tests"
387          }
388        },
389        {
390          "command_started_event": {
391            "command": {
392              "commitTransaction": 1,
393              "lsid": "session0",
394              "txnNumber": {
395                "$numberLong": "1"
396              },
397              "startTransaction": null,
398              "autocommit": false,
399              "writeConcern": null
400            },
401            "command_name": "commitTransaction",
402            "database_name": "admin"
403          }
404        }
405      ],
406      "outcome": {
407        "collection": {
408          "data": []
409        }
410      }
411    },
412    {
413      "description": "commitTransaction is not retried after UnsatisfiableWriteConcern error",
414      "failPoint": {
415        "configureFailPoint": "failCommand",
416        "mode": {
417          "times": 1
418        },
419        "data": {
420          "failCommands": [
421            "commitTransaction"
422          ],
423          "writeConcernError": {
424            "code": 100,
425            "errmsg": "Not enough data-bearing nodes"
426          }
427        }
428      },
429      "operations": [
430        {
431          "name": "startTransaction",
432          "object": "session0",
433          "arguments": {
434            "options": {
435              "writeConcern": {
436                "w": "majority"
437              }
438            }
439          }
440        },
441        {
442          "name": "insertOne",
443          "object": "collection",
444          "arguments": {
445            "session": "session0",
446            "document": {
447              "_id": 1
448            }
449          },
450          "result": {
451            "insertedId": 1
452          }
453        },
454        {
455          "name": "commitTransaction",
456          "object": "session0",
457          "result": {
458            "errorLabelsOmit": [
459              "RetryableWriteError",
460              "TransientTransactionError",
461              "UnknownTransactionCommitResult"
462            ]
463          }
464        }
465      ],
466      "expectations": [
467        {
468          "command_started_event": {
469            "command": {
470              "insert": "test",
471              "documents": [
472                {
473                  "_id": 1
474                }
475              ],
476              "ordered": true,
477              "readConcern": null,
478              "lsid": "session0",
479              "txnNumber": {
480                "$numberLong": "1"
481              },
482              "startTransaction": true,
483              "autocommit": false,
484              "writeConcern": null
485            },
486            "command_name": "insert",
487            "database_name": "transaction-tests"
488          }
489        },
490        {
491          "command_started_event": {
492            "command": {
493              "commitTransaction": 1,
494              "lsid": "session0",
495              "txnNumber": {
496                "$numberLong": "1"
497              },
498              "startTransaction": null,
499              "autocommit": false,
500              "writeConcern": {
501                "w": "majority"
502              }
503            },
504            "command_name": "commitTransaction",
505            "database_name": "admin"
506          }
507        }
508      ],
509      "outcome": {
510        "collection": {
511          "data": [
512            {
513              "_id": 1
514            }
515          ]
516        }
517      }
518    },
519    {
520      "description": "commitTransaction succeeds after connection error",
521      "failPoint": {
522        "configureFailPoint": "failCommand",
523        "mode": {
524          "times": 1
525        },
526        "data": {
527          "failCommands": [
528            "commitTransaction"
529          ],
530          "closeConnection": true
531        }
532      },
533      "operations": [
534        {
535          "name": "startTransaction",
536          "object": "session0"
537        },
538        {
539          "name": "insertOne",
540          "object": "collection",
541          "arguments": {
542            "session": "session0",
543            "document": {
544              "_id": 1
545            }
546          },
547          "result": {
548            "insertedId": 1
549          }
550        },
551        {
552          "name": "commitTransaction",
553          "object": "session0"
554        }
555      ],
556      "expectations": [
557        {
558          "command_started_event": {
559            "command": {
560              "insert": "test",
561              "documents": [
562                {
563                  "_id": 1
564                }
565              ],
566              "ordered": true,
567              "readConcern": null,
568              "lsid": "session0",
569              "txnNumber": {
570                "$numberLong": "1"
571              },
572              "startTransaction": true,
573              "autocommit": false,
574              "writeConcern": null
575            },
576            "command_name": "insert",
577            "database_name": "transaction-tests"
578          }
579        },
580        {
581          "command_started_event": {
582            "command": {
583              "commitTransaction": 1,
584              "lsid": "session0",
585              "txnNumber": {
586                "$numberLong": "1"
587              },
588              "startTransaction": null,
589              "autocommit": false,
590              "writeConcern": null
591            },
592            "command_name": "commitTransaction",
593            "database_name": "admin"
594          }
595        },
596        {
597          "command_started_event": {
598            "command": {
599              "commitTransaction": 1,
600              "lsid": "session0",
601              "txnNumber": {
602                "$numberLong": "1"
603              },
604              "startTransaction": null,
605              "autocommit": false,
606              "writeConcern": {
607                "w": "majority",
608                "wtimeout": 10000
609              }
610            },
611            "command_name": "commitTransaction",
612            "database_name": "admin"
613          }
614        }
615      ],
616      "outcome": {
617        "collection": {
618          "data": [
619            {
620              "_id": 1
621            }
622          ]
623        }
624      }
625    },
626    {
627      "description": "commitTransaction succeeds after NotMaster",
628      "failPoint": {
629        "configureFailPoint": "failCommand",
630        "mode": {
631          "times": 1
632        },
633        "data": {
634          "failCommands": [
635            "commitTransaction"
636          ],
637          "errorCode": 10107,
638          "errorLabels": [
639            "RetryableWriteError"
640          ],
641          "closeConnection": false
642        }
643      },
644      "operations": [
645        {
646          "name": "startTransaction",
647          "object": "session0"
648        },
649        {
650          "name": "insertOne",
651          "object": "collection",
652          "arguments": {
653            "session": "session0",
654            "document": {
655              "_id": 1
656            }
657          },
658          "result": {
659            "insertedId": 1
660          }
661        },
662        {
663          "name": "commitTransaction",
664          "object": "session0"
665        }
666      ],
667      "expectations": [
668        {
669          "command_started_event": {
670            "command": {
671              "insert": "test",
672              "documents": [
673                {
674                  "_id": 1
675                }
676              ],
677              "ordered": true,
678              "readConcern": null,
679              "lsid": "session0",
680              "txnNumber": {
681                "$numberLong": "1"
682              },
683              "startTransaction": true,
684              "autocommit": false,
685              "writeConcern": null
686            },
687            "command_name": "insert",
688            "database_name": "transaction-tests"
689          }
690        },
691        {
692          "command_started_event": {
693            "command": {
694              "commitTransaction": 1,
695              "lsid": "session0",
696              "txnNumber": {
697                "$numberLong": "1"
698              },
699              "startTransaction": null,
700              "autocommit": false,
701              "writeConcern": null
702            },
703            "command_name": "commitTransaction",
704            "database_name": "admin"
705          }
706        },
707        {
708          "command_started_event": {
709            "command": {
710              "commitTransaction": 1,
711              "lsid": "session0",
712              "txnNumber": {
713                "$numberLong": "1"
714              },
715              "startTransaction": null,
716              "autocommit": false,
717              "writeConcern": {
718                "w": "majority",
719                "wtimeout": 10000
720              }
721            },
722            "command_name": "commitTransaction",
723            "database_name": "admin"
724          }
725        }
726      ],
727      "outcome": {
728        "collection": {
729          "data": [
730            {
731              "_id": 1
732            }
733          ]
734        }
735      }
736    },
737    {
738      "description": "commitTransaction succeeds after NotMasterOrSecondary",
739      "failPoint": {
740        "configureFailPoint": "failCommand",
741        "mode": {
742          "times": 1
743        },
744        "data": {
745          "failCommands": [
746            "commitTransaction"
747          ],
748          "errorCode": 13436,
749          "errorLabels": [
750            "RetryableWriteError"
751          ],
752          "closeConnection": false
753        }
754      },
755      "operations": [
756        {
757          "name": "startTransaction",
758          "object": "session0"
759        },
760        {
761          "name": "insertOne",
762          "object": "collection",
763          "arguments": {
764            "session": "session0",
765            "document": {
766              "_id": 1
767            }
768          },
769          "result": {
770            "insertedId": 1
771          }
772        },
773        {
774          "name": "commitTransaction",
775          "object": "session0"
776        }
777      ],
778      "expectations": [
779        {
780          "command_started_event": {
781            "command": {
782              "insert": "test",
783              "documents": [
784                {
785                  "_id": 1
786                }
787              ],
788              "ordered": true,
789              "readConcern": null,
790              "lsid": "session0",
791              "txnNumber": {
792                "$numberLong": "1"
793              },
794              "startTransaction": true,
795              "autocommit": false,
796              "writeConcern": null
797            },
798            "command_name": "insert",
799            "database_name": "transaction-tests"
800          }
801        },
802        {
803          "command_started_event": {
804            "command": {
805              "commitTransaction": 1,
806              "lsid": "session0",
807              "txnNumber": {
808                "$numberLong": "1"
809              },
810              "startTransaction": null,
811              "autocommit": false,
812              "writeConcern": null
813            },
814            "command_name": "commitTransaction",
815            "database_name": "admin"
816          }
817        },
818        {
819          "command_started_event": {
820            "command": {
821              "commitTransaction": 1,
822              "lsid": "session0",
823              "txnNumber": {
824                "$numberLong": "1"
825              },
826              "startTransaction": null,
827              "autocommit": false,
828              "writeConcern": {
829                "w": "majority",
830                "wtimeout": 10000
831              }
832            },
833            "command_name": "commitTransaction",
834            "database_name": "admin"
835          }
836        }
837      ],
838      "outcome": {
839        "collection": {
840          "data": [
841            {
842              "_id": 1
843            }
844          ]
845        }
846      }
847    },
848    {
849      "description": "commitTransaction succeeds after NotMasterNoSlaveOk",
850      "failPoint": {
851        "configureFailPoint": "failCommand",
852        "mode": {
853          "times": 1
854        },
855        "data": {
856          "failCommands": [
857            "commitTransaction"
858          ],
859          "errorCode": 13435,
860          "errorLabels": [
861            "RetryableWriteError"
862          ],
863          "closeConnection": false
864        }
865      },
866      "operations": [
867        {
868          "name": "startTransaction",
869          "object": "session0"
870        },
871        {
872          "name": "insertOne",
873          "object": "collection",
874          "arguments": {
875            "session": "session0",
876            "document": {
877              "_id": 1
878            }
879          },
880          "result": {
881            "insertedId": 1
882          }
883        },
884        {
885          "name": "commitTransaction",
886          "object": "session0"
887        }
888      ],
889      "expectations": [
890        {
891          "command_started_event": {
892            "command": {
893              "insert": "test",
894              "documents": [
895                {
896                  "_id": 1
897                }
898              ],
899              "ordered": true,
900              "readConcern": null,
901              "lsid": "session0",
902              "txnNumber": {
903                "$numberLong": "1"
904              },
905              "startTransaction": true,
906              "autocommit": false,
907              "writeConcern": null
908            },
909            "command_name": "insert",
910            "database_name": "transaction-tests"
911          }
912        },
913        {
914          "command_started_event": {
915            "command": {
916              "commitTransaction": 1,
917              "lsid": "session0",
918              "txnNumber": {
919                "$numberLong": "1"
920              },
921              "startTransaction": null,
922              "autocommit": false,
923              "writeConcern": null
924            },
925            "command_name": "commitTransaction",
926            "database_name": "admin"
927          }
928        },
929        {
930          "command_started_event": {
931            "command": {
932              "commitTransaction": 1,
933              "lsid": "session0",
934              "txnNumber": {
935                "$numberLong": "1"
936              },
937              "startTransaction": null,
938              "autocommit": false,
939              "writeConcern": {
940                "w": "majority",
941                "wtimeout": 10000
942              }
943            },
944            "command_name": "commitTransaction",
945            "database_name": "admin"
946          }
947        }
948      ],
949      "outcome": {
950        "collection": {
951          "data": [
952            {
953              "_id": 1
954            }
955          ]
956        }
957      }
958    },
959    {
960      "description": "commitTransaction succeeds after InterruptedDueToReplStateChange",
961      "failPoint": {
962        "configureFailPoint": "failCommand",
963        "mode": {
964          "times": 1
965        },
966        "data": {
967          "failCommands": [
968            "commitTransaction"
969          ],
970          "errorCode": 11602,
971          "errorLabels": [
972            "RetryableWriteError"
973          ],
974          "closeConnection": false
975        }
976      },
977      "operations": [
978        {
979          "name": "startTransaction",
980          "object": "session0"
981        },
982        {
983          "name": "insertOne",
984          "object": "collection",
985          "arguments": {
986            "session": "session0",
987            "document": {
988              "_id": 1
989            }
990          },
991          "result": {
992            "insertedId": 1
993          }
994        },
995        {
996          "name": "commitTransaction",
997          "object": "session0"
998        }
999      ],
1000      "expectations": [
1001        {
1002          "command_started_event": {
1003            "command": {
1004              "insert": "test",
1005              "documents": [
1006                {
1007                  "_id": 1
1008                }
1009              ],
1010              "ordered": true,
1011              "readConcern": null,
1012              "lsid": "session0",
1013              "txnNumber": {
1014                "$numberLong": "1"
1015              },
1016              "startTransaction": true,
1017              "autocommit": false,
1018              "writeConcern": null
1019            },
1020            "command_name": "insert",
1021            "database_name": "transaction-tests"
1022          }
1023        },
1024        {
1025          "command_started_event": {
1026            "command": {
1027              "commitTransaction": 1,
1028              "lsid": "session0",
1029              "txnNumber": {
1030                "$numberLong": "1"
1031              },
1032              "startTransaction": null,
1033              "autocommit": false,
1034              "writeConcern": null
1035            },
1036            "command_name": "commitTransaction",
1037            "database_name": "admin"
1038          }
1039        },
1040        {
1041          "command_started_event": {
1042            "command": {
1043              "commitTransaction": 1,
1044              "lsid": "session0",
1045              "txnNumber": {
1046                "$numberLong": "1"
1047              },
1048              "startTransaction": null,
1049              "autocommit": false,
1050              "writeConcern": {
1051                "w": "majority",
1052                "wtimeout": 10000
1053              }
1054            },
1055            "command_name": "commitTransaction",
1056            "database_name": "admin"
1057          }
1058        }
1059      ],
1060      "outcome": {
1061        "collection": {
1062          "data": [
1063            {
1064              "_id": 1
1065            }
1066          ]
1067        }
1068      }
1069    },
1070    {
1071      "description": "commitTransaction succeeds after InterruptedAtShutdown",
1072      "failPoint": {
1073        "configureFailPoint": "failCommand",
1074        "mode": {
1075          "times": 1
1076        },
1077        "data": {
1078          "failCommands": [
1079            "commitTransaction"
1080          ],
1081          "errorCode": 11600,
1082          "errorLabels": [
1083            "RetryableWriteError"
1084          ],
1085          "closeConnection": false
1086        }
1087      },
1088      "operations": [
1089        {
1090          "name": "startTransaction",
1091          "object": "session0"
1092        },
1093        {
1094          "name": "insertOne",
1095          "object": "collection",
1096          "arguments": {
1097            "session": "session0",
1098            "document": {
1099              "_id": 1
1100            }
1101          },
1102          "result": {
1103            "insertedId": 1
1104          }
1105        },
1106        {
1107          "name": "commitTransaction",
1108          "object": "session0"
1109        }
1110      ],
1111      "expectations": [
1112        {
1113          "command_started_event": {
1114            "command": {
1115              "insert": "test",
1116              "documents": [
1117                {
1118                  "_id": 1
1119                }
1120              ],
1121              "ordered": true,
1122              "readConcern": null,
1123              "lsid": "session0",
1124              "txnNumber": {
1125                "$numberLong": "1"
1126              },
1127              "startTransaction": true,
1128              "autocommit": false,
1129              "writeConcern": null
1130            },
1131            "command_name": "insert",
1132            "database_name": "transaction-tests"
1133          }
1134        },
1135        {
1136          "command_started_event": {
1137            "command": {
1138              "commitTransaction": 1,
1139              "lsid": "session0",
1140              "txnNumber": {
1141                "$numberLong": "1"
1142              },
1143              "startTransaction": null,
1144              "autocommit": false,
1145              "writeConcern": null
1146            },
1147            "command_name": "commitTransaction",
1148            "database_name": "admin"
1149          }
1150        },
1151        {
1152          "command_started_event": {
1153            "command": {
1154              "commitTransaction": 1,
1155              "lsid": "session0",
1156              "txnNumber": {
1157                "$numberLong": "1"
1158              },
1159              "startTransaction": null,
1160              "autocommit": false,
1161              "writeConcern": {
1162                "w": "majority",
1163                "wtimeout": 10000
1164              }
1165            },
1166            "command_name": "commitTransaction",
1167            "database_name": "admin"
1168          }
1169        }
1170      ],
1171      "outcome": {
1172        "collection": {
1173          "data": [
1174            {
1175              "_id": 1
1176            }
1177          ]
1178        }
1179      }
1180    },
1181    {
1182      "description": "commitTransaction succeeds after PrimarySteppedDown",
1183      "failPoint": {
1184        "configureFailPoint": "failCommand",
1185        "mode": {
1186          "times": 1
1187        },
1188        "data": {
1189          "failCommands": [
1190            "commitTransaction"
1191          ],
1192          "errorCode": 189,
1193          "errorLabels": [
1194            "RetryableWriteError"
1195          ],
1196          "closeConnection": false
1197        }
1198      },
1199      "operations": [
1200        {
1201          "name": "startTransaction",
1202          "object": "session0"
1203        },
1204        {
1205          "name": "insertOne",
1206          "object": "collection",
1207          "arguments": {
1208            "session": "session0",
1209            "document": {
1210              "_id": 1
1211            }
1212          },
1213          "result": {
1214            "insertedId": 1
1215          }
1216        },
1217        {
1218          "name": "commitTransaction",
1219          "object": "session0"
1220        }
1221      ],
1222      "expectations": [
1223        {
1224          "command_started_event": {
1225            "command": {
1226              "insert": "test",
1227              "documents": [
1228                {
1229                  "_id": 1
1230                }
1231              ],
1232              "ordered": true,
1233              "readConcern": null,
1234              "lsid": "session0",
1235              "txnNumber": {
1236                "$numberLong": "1"
1237              },
1238              "startTransaction": true,
1239              "autocommit": false,
1240              "writeConcern": null
1241            },
1242            "command_name": "insert",
1243            "database_name": "transaction-tests"
1244          }
1245        },
1246        {
1247          "command_started_event": {
1248            "command": {
1249              "commitTransaction": 1,
1250              "lsid": "session0",
1251              "txnNumber": {
1252                "$numberLong": "1"
1253              },
1254              "startTransaction": null,
1255              "autocommit": false,
1256              "writeConcern": null
1257            },
1258            "command_name": "commitTransaction",
1259            "database_name": "admin"
1260          }
1261        },
1262        {
1263          "command_started_event": {
1264            "command": {
1265              "commitTransaction": 1,
1266              "lsid": "session0",
1267              "txnNumber": {
1268                "$numberLong": "1"
1269              },
1270              "startTransaction": null,
1271              "autocommit": false,
1272              "writeConcern": {
1273                "w": "majority",
1274                "wtimeout": 10000
1275              }
1276            },
1277            "command_name": "commitTransaction",
1278            "database_name": "admin"
1279          }
1280        }
1281      ],
1282      "outcome": {
1283        "collection": {
1284          "data": [
1285            {
1286              "_id": 1
1287            }
1288          ]
1289        }
1290      }
1291    },
1292    {
1293      "description": "commitTransaction succeeds after ShutdownInProgress",
1294      "failPoint": {
1295        "configureFailPoint": "failCommand",
1296        "mode": {
1297          "times": 1
1298        },
1299        "data": {
1300          "failCommands": [
1301            "commitTransaction"
1302          ],
1303          "errorCode": 91,
1304          "errorLabels": [
1305            "RetryableWriteError"
1306          ],
1307          "closeConnection": false
1308        }
1309      },
1310      "operations": [
1311        {
1312          "name": "startTransaction",
1313          "object": "session0"
1314        },
1315        {
1316          "name": "insertOne",
1317          "object": "collection",
1318          "arguments": {
1319            "session": "session0",
1320            "document": {
1321              "_id": 1
1322            }
1323          },
1324          "result": {
1325            "insertedId": 1
1326          }
1327        },
1328        {
1329          "name": "commitTransaction",
1330          "object": "session0"
1331        }
1332      ],
1333      "expectations": [
1334        {
1335          "command_started_event": {
1336            "command": {
1337              "insert": "test",
1338              "documents": [
1339                {
1340                  "_id": 1
1341                }
1342              ],
1343              "ordered": true,
1344              "readConcern": null,
1345              "lsid": "session0",
1346              "txnNumber": {
1347                "$numberLong": "1"
1348              },
1349              "startTransaction": true,
1350              "autocommit": false,
1351              "writeConcern": null
1352            },
1353            "command_name": "insert",
1354            "database_name": "transaction-tests"
1355          }
1356        },
1357        {
1358          "command_started_event": {
1359            "command": {
1360              "commitTransaction": 1,
1361              "lsid": "session0",
1362              "txnNumber": {
1363                "$numberLong": "1"
1364              },
1365              "startTransaction": null,
1366              "autocommit": false,
1367              "writeConcern": null
1368            },
1369            "command_name": "commitTransaction",
1370            "database_name": "admin"
1371          }
1372        },
1373        {
1374          "command_started_event": {
1375            "command": {
1376              "commitTransaction": 1,
1377              "lsid": "session0",
1378              "txnNumber": {
1379                "$numberLong": "1"
1380              },
1381              "startTransaction": null,
1382              "autocommit": false,
1383              "writeConcern": {
1384                "w": "majority",
1385                "wtimeout": 10000
1386              }
1387            },
1388            "command_name": "commitTransaction",
1389            "database_name": "admin"
1390          }
1391        }
1392      ],
1393      "outcome": {
1394        "collection": {
1395          "data": [
1396            {
1397              "_id": 1
1398            }
1399          ]
1400        }
1401      }
1402    },
1403    {
1404      "description": "commitTransaction succeeds after HostNotFound",
1405      "failPoint": {
1406        "configureFailPoint": "failCommand",
1407        "mode": {
1408          "times": 1
1409        },
1410        "data": {
1411          "failCommands": [
1412            "commitTransaction"
1413          ],
1414          "errorCode": 7,
1415          "errorLabels": [
1416            "RetryableWriteError"
1417          ],
1418          "closeConnection": false
1419        }
1420      },
1421      "operations": [
1422        {
1423          "name": "startTransaction",
1424          "object": "session0"
1425        },
1426        {
1427          "name": "insertOne",
1428          "object": "collection",
1429          "arguments": {
1430            "session": "session0",
1431            "document": {
1432              "_id": 1
1433            }
1434          },
1435          "result": {
1436            "insertedId": 1
1437          }
1438        },
1439        {
1440          "name": "commitTransaction",
1441          "object": "session0"
1442        }
1443      ],
1444      "expectations": [
1445        {
1446          "command_started_event": {
1447            "command": {
1448              "insert": "test",
1449              "documents": [
1450                {
1451                  "_id": 1
1452                }
1453              ],
1454              "ordered": true,
1455              "readConcern": null,
1456              "lsid": "session0",
1457              "txnNumber": {
1458                "$numberLong": "1"
1459              },
1460              "startTransaction": true,
1461              "autocommit": false,
1462              "writeConcern": null
1463            },
1464            "command_name": "insert",
1465            "database_name": "transaction-tests"
1466          }
1467        },
1468        {
1469          "command_started_event": {
1470            "command": {
1471              "commitTransaction": 1,
1472              "lsid": "session0",
1473              "txnNumber": {
1474                "$numberLong": "1"
1475              },
1476              "startTransaction": null,
1477              "autocommit": false,
1478              "writeConcern": null
1479            },
1480            "command_name": "commitTransaction",
1481            "database_name": "admin"
1482          }
1483        },
1484        {
1485          "command_started_event": {
1486            "command": {
1487              "commitTransaction": 1,
1488              "lsid": "session0",
1489              "txnNumber": {
1490                "$numberLong": "1"
1491              },
1492              "startTransaction": null,
1493              "autocommit": false,
1494              "writeConcern": {
1495                "w": "majority",
1496                "wtimeout": 10000
1497              }
1498            },
1499            "command_name": "commitTransaction",
1500            "database_name": "admin"
1501          }
1502        }
1503      ],
1504      "outcome": {
1505        "collection": {
1506          "data": [
1507            {
1508              "_id": 1
1509            }
1510          ]
1511        }
1512      }
1513    },
1514    {
1515      "description": "commitTransaction succeeds after HostUnreachable",
1516      "failPoint": {
1517        "configureFailPoint": "failCommand",
1518        "mode": {
1519          "times": 1
1520        },
1521        "data": {
1522          "failCommands": [
1523            "commitTransaction"
1524          ],
1525          "errorCode": 6,
1526          "errorLabels": [
1527            "RetryableWriteError"
1528          ],
1529          "closeConnection": false
1530        }
1531      },
1532      "operations": [
1533        {
1534          "name": "startTransaction",
1535          "object": "session0"
1536        },
1537        {
1538          "name": "insertOne",
1539          "object": "collection",
1540          "arguments": {
1541            "session": "session0",
1542            "document": {
1543              "_id": 1
1544            }
1545          },
1546          "result": {
1547            "insertedId": 1
1548          }
1549        },
1550        {
1551          "name": "commitTransaction",
1552          "object": "session0"
1553        }
1554      ],
1555      "expectations": [
1556        {
1557          "command_started_event": {
1558            "command": {
1559              "insert": "test",
1560              "documents": [
1561                {
1562                  "_id": 1
1563                }
1564              ],
1565              "ordered": true,
1566              "readConcern": null,
1567              "lsid": "session0",
1568              "txnNumber": {
1569                "$numberLong": "1"
1570              },
1571              "startTransaction": true,
1572              "autocommit": false,
1573              "writeConcern": null
1574            },
1575            "command_name": "insert",
1576            "database_name": "transaction-tests"
1577          }
1578        },
1579        {
1580          "command_started_event": {
1581            "command": {
1582              "commitTransaction": 1,
1583              "lsid": "session0",
1584              "txnNumber": {
1585                "$numberLong": "1"
1586              },
1587              "startTransaction": null,
1588              "autocommit": false,
1589              "writeConcern": null
1590            },
1591            "command_name": "commitTransaction",
1592            "database_name": "admin"
1593          }
1594        },
1595        {
1596          "command_started_event": {
1597            "command": {
1598              "commitTransaction": 1,
1599              "lsid": "session0",
1600              "txnNumber": {
1601                "$numberLong": "1"
1602              },
1603              "startTransaction": null,
1604              "autocommit": false,
1605              "writeConcern": {
1606                "w": "majority",
1607                "wtimeout": 10000
1608              }
1609            },
1610            "command_name": "commitTransaction",
1611            "database_name": "admin"
1612          }
1613        }
1614      ],
1615      "outcome": {
1616        "collection": {
1617          "data": [
1618            {
1619              "_id": 1
1620            }
1621          ]
1622        }
1623      }
1624    },
1625    {
1626      "description": "commitTransaction succeeds after SocketException",
1627      "failPoint": {
1628        "configureFailPoint": "failCommand",
1629        "mode": {
1630          "times": 1
1631        },
1632        "data": {
1633          "failCommands": [
1634            "commitTransaction"
1635          ],
1636          "errorCode": 9001,
1637          "errorLabels": [
1638            "RetryableWriteError"
1639          ],
1640          "closeConnection": false
1641        }
1642      },
1643      "operations": [
1644        {
1645          "name": "startTransaction",
1646          "object": "session0"
1647        },
1648        {
1649          "name": "insertOne",
1650          "object": "collection",
1651          "arguments": {
1652            "session": "session0",
1653            "document": {
1654              "_id": 1
1655            }
1656          },
1657          "result": {
1658            "insertedId": 1
1659          }
1660        },
1661        {
1662          "name": "commitTransaction",
1663          "object": "session0"
1664        }
1665      ],
1666      "expectations": [
1667        {
1668          "command_started_event": {
1669            "command": {
1670              "insert": "test",
1671              "documents": [
1672                {
1673                  "_id": 1
1674                }
1675              ],
1676              "ordered": true,
1677              "readConcern": null,
1678              "lsid": "session0",
1679              "txnNumber": {
1680                "$numberLong": "1"
1681              },
1682              "startTransaction": true,
1683              "autocommit": false,
1684              "writeConcern": null
1685            },
1686            "command_name": "insert",
1687            "database_name": "transaction-tests"
1688          }
1689        },
1690        {
1691          "command_started_event": {
1692            "command": {
1693              "commitTransaction": 1,
1694              "lsid": "session0",
1695              "txnNumber": {
1696                "$numberLong": "1"
1697              },
1698              "startTransaction": null,
1699              "autocommit": false,
1700              "writeConcern": null
1701            },
1702            "command_name": "commitTransaction",
1703            "database_name": "admin"
1704          }
1705        },
1706        {
1707          "command_started_event": {
1708            "command": {
1709              "commitTransaction": 1,
1710              "lsid": "session0",
1711              "txnNumber": {
1712                "$numberLong": "1"
1713              },
1714              "startTransaction": null,
1715              "autocommit": false,
1716              "writeConcern": {
1717                "w": "majority",
1718                "wtimeout": 10000
1719              }
1720            },
1721            "command_name": "commitTransaction",
1722            "database_name": "admin"
1723          }
1724        }
1725      ],
1726      "outcome": {
1727        "collection": {
1728          "data": [
1729            {
1730              "_id": 1
1731            }
1732          ]
1733        }
1734      }
1735    },
1736    {
1737      "description": "commitTransaction succeeds after NetworkTimeout",
1738      "failPoint": {
1739        "configureFailPoint": "failCommand",
1740        "mode": {
1741          "times": 1
1742        },
1743        "data": {
1744          "failCommands": [
1745            "commitTransaction"
1746          ],
1747          "errorCode": 89,
1748          "errorLabels": [
1749            "RetryableWriteError"
1750          ],
1751          "closeConnection": false
1752        }
1753      },
1754      "operations": [
1755        {
1756          "name": "startTransaction",
1757          "object": "session0"
1758        },
1759        {
1760          "name": "insertOne",
1761          "object": "collection",
1762          "arguments": {
1763            "session": "session0",
1764            "document": {
1765              "_id": 1
1766            }
1767          },
1768          "result": {
1769            "insertedId": 1
1770          }
1771        },
1772        {
1773          "name": "commitTransaction",
1774          "object": "session0"
1775        }
1776      ],
1777      "expectations": [
1778        {
1779          "command_started_event": {
1780            "command": {
1781              "insert": "test",
1782              "documents": [
1783                {
1784                  "_id": 1
1785                }
1786              ],
1787              "ordered": true,
1788              "readConcern": null,
1789              "lsid": "session0",
1790              "txnNumber": {
1791                "$numberLong": "1"
1792              },
1793              "startTransaction": true,
1794              "autocommit": false,
1795              "writeConcern": null
1796            },
1797            "command_name": "insert",
1798            "database_name": "transaction-tests"
1799          }
1800        },
1801        {
1802          "command_started_event": {
1803            "command": {
1804              "commitTransaction": 1,
1805              "lsid": "session0",
1806              "txnNumber": {
1807                "$numberLong": "1"
1808              },
1809              "startTransaction": null,
1810              "autocommit": false,
1811              "writeConcern": null
1812            },
1813            "command_name": "commitTransaction",
1814            "database_name": "admin"
1815          }
1816        },
1817        {
1818          "command_started_event": {
1819            "command": {
1820              "commitTransaction": 1,
1821              "lsid": "session0",
1822              "txnNumber": {
1823                "$numberLong": "1"
1824              },
1825              "startTransaction": null,
1826              "autocommit": false,
1827              "writeConcern": {
1828                "w": "majority",
1829                "wtimeout": 10000
1830              }
1831            },
1832            "command_name": "commitTransaction",
1833            "database_name": "admin"
1834          }
1835        }
1836      ],
1837      "outcome": {
1838        "collection": {
1839          "data": [
1840            {
1841              "_id": 1
1842            }
1843          ]
1844        }
1845      }
1846    },
1847    {
1848      "description": "commitTransaction succeeds after WriteConcernError InterruptedAtShutdown",
1849      "failPoint": {
1850        "configureFailPoint": "failCommand",
1851        "mode": {
1852          "times": 1
1853        },
1854        "data": {
1855          "failCommands": [
1856            "commitTransaction"
1857          ],
1858          "writeConcernError": {
1859            "code": 11600,
1860            "errorLabels": [
1861              "RetryableWriteError"
1862            ],
1863            "errmsg": "Replication is being shut down"
1864          }
1865        }
1866      },
1867      "operations": [
1868        {
1869          "name": "startTransaction",
1870          "object": "session0",
1871          "arguments": {
1872            "options": {
1873              "writeConcern": {
1874                "w": "majority"
1875              }
1876            }
1877          }
1878        },
1879        {
1880          "name": "insertOne",
1881          "object": "collection",
1882          "arguments": {
1883            "session": "session0",
1884            "document": {
1885              "_id": 1
1886            }
1887          },
1888          "result": {
1889            "insertedId": 1
1890          }
1891        },
1892        {
1893          "name": "commitTransaction",
1894          "object": "session0"
1895        }
1896      ],
1897      "expectations": [
1898        {
1899          "command_started_event": {
1900            "command": {
1901              "insert": "test",
1902              "documents": [
1903                {
1904                  "_id": 1
1905                }
1906              ],
1907              "ordered": true,
1908              "readConcern": null,
1909              "lsid": "session0",
1910              "txnNumber": {
1911                "$numberLong": "1"
1912              },
1913              "startTransaction": true,
1914              "autocommit": false,
1915              "writeConcern": null
1916            },
1917            "command_name": "insert",
1918            "database_name": "transaction-tests"
1919          }
1920        },
1921        {
1922          "command_started_event": {
1923            "command": {
1924              "commitTransaction": 1,
1925              "lsid": "session0",
1926              "txnNumber": {
1927                "$numberLong": "1"
1928              },
1929              "startTransaction": null,
1930              "autocommit": false,
1931              "writeConcern": {
1932                "w": "majority"
1933              }
1934            },
1935            "command_name": "commitTransaction",
1936            "database_name": "admin"
1937          }
1938        },
1939        {
1940          "command_started_event": {
1941            "command": {
1942              "commitTransaction": 1,
1943              "lsid": "session0",
1944              "txnNumber": {
1945                "$numberLong": "1"
1946              },
1947              "startTransaction": null,
1948              "autocommit": false,
1949              "writeConcern": {
1950                "w": "majority",
1951                "wtimeout": 10000
1952              }
1953            },
1954            "command_name": "commitTransaction",
1955            "database_name": "admin"
1956          }
1957        }
1958      ],
1959      "outcome": {
1960        "collection": {
1961          "data": [
1962            {
1963              "_id": 1
1964            }
1965          ]
1966        }
1967      }
1968    },
1969    {
1970      "description": "commitTransaction succeeds after WriteConcernError InterruptedDueToReplStateChange",
1971      "failPoint": {
1972        "configureFailPoint": "failCommand",
1973        "mode": {
1974          "times": 1
1975        },
1976        "data": {
1977          "failCommands": [
1978            "commitTransaction"
1979          ],
1980          "writeConcernError": {
1981            "code": 11602,
1982            "errorLabels": [
1983              "RetryableWriteError"
1984            ],
1985            "errmsg": "Replication is being shut down"
1986          }
1987        }
1988      },
1989      "operations": [
1990        {
1991          "name": "startTransaction",
1992          "object": "session0",
1993          "arguments": {
1994            "options": {
1995              "writeConcern": {
1996                "w": "majority"
1997              }
1998            }
1999          }
2000        },
2001        {
2002          "name": "insertOne",
2003          "object": "collection",
2004          "arguments": {
2005            "session": "session0",
2006            "document": {
2007              "_id": 1
2008            }
2009          },
2010          "result": {
2011            "insertedId": 1
2012          }
2013        },
2014        {
2015          "name": "commitTransaction",
2016          "object": "session0"
2017        }
2018      ],
2019      "expectations": [
2020        {
2021          "command_started_event": {
2022            "command": {
2023              "insert": "test",
2024              "documents": [
2025                {
2026                  "_id": 1
2027                }
2028              ],
2029              "ordered": true,
2030              "readConcern": null,
2031              "lsid": "session0",
2032              "txnNumber": {
2033                "$numberLong": "1"
2034              },
2035              "startTransaction": true,
2036              "autocommit": false,
2037              "writeConcern": null
2038            },
2039            "command_name": "insert",
2040            "database_name": "transaction-tests"
2041          }
2042        },
2043        {
2044          "command_started_event": {
2045            "command": {
2046              "commitTransaction": 1,
2047              "lsid": "session0",
2048              "txnNumber": {
2049                "$numberLong": "1"
2050              },
2051              "startTransaction": null,
2052              "autocommit": false,
2053              "writeConcern": {
2054                "w": "majority"
2055              }
2056            },
2057            "command_name": "commitTransaction",
2058            "database_name": "admin"
2059          }
2060        },
2061        {
2062          "command_started_event": {
2063            "command": {
2064              "commitTransaction": 1,
2065              "lsid": "session0",
2066              "txnNumber": {
2067                "$numberLong": "1"
2068              },
2069              "startTransaction": null,
2070              "autocommit": false,
2071              "writeConcern": {
2072                "w": "majority",
2073                "wtimeout": 10000
2074              }
2075            },
2076            "command_name": "commitTransaction",
2077            "database_name": "admin"
2078          }
2079        }
2080      ],
2081      "outcome": {
2082        "collection": {
2083          "data": [
2084            {
2085              "_id": 1
2086            }
2087          ]
2088        }
2089      }
2090    },
2091    {
2092      "description": "commitTransaction succeeds after WriteConcernError PrimarySteppedDown",
2093      "failPoint": {
2094        "configureFailPoint": "failCommand",
2095        "mode": {
2096          "times": 1
2097        },
2098        "data": {
2099          "failCommands": [
2100            "commitTransaction"
2101          ],
2102          "writeConcernError": {
2103            "code": 189,
2104            "errorLabels": [
2105              "RetryableWriteError"
2106            ],
2107            "errmsg": "Replication is being shut down"
2108          }
2109        }
2110      },
2111      "operations": [
2112        {
2113          "name": "startTransaction",
2114          "object": "session0",
2115          "arguments": {
2116            "options": {
2117              "writeConcern": {
2118                "w": "majority"
2119              }
2120            }
2121          }
2122        },
2123        {
2124          "name": "insertOne",
2125          "object": "collection",
2126          "arguments": {
2127            "session": "session0",
2128            "document": {
2129              "_id": 1
2130            }
2131          },
2132          "result": {
2133            "insertedId": 1
2134          }
2135        },
2136        {
2137          "name": "commitTransaction",
2138          "object": "session0"
2139        }
2140      ],
2141      "expectations": [
2142        {
2143          "command_started_event": {
2144            "command": {
2145              "insert": "test",
2146              "documents": [
2147                {
2148                  "_id": 1
2149                }
2150              ],
2151              "ordered": true,
2152              "readConcern": null,
2153              "lsid": "session0",
2154              "txnNumber": {
2155                "$numberLong": "1"
2156              },
2157              "startTransaction": true,
2158              "autocommit": false,
2159              "writeConcern": null
2160            },
2161            "command_name": "insert",
2162            "database_name": "transaction-tests"
2163          }
2164        },
2165        {
2166          "command_started_event": {
2167            "command": {
2168              "commitTransaction": 1,
2169              "lsid": "session0",
2170              "txnNumber": {
2171                "$numberLong": "1"
2172              },
2173              "startTransaction": null,
2174              "autocommit": false,
2175              "writeConcern": {
2176                "w": "majority"
2177              }
2178            },
2179            "command_name": "commitTransaction",
2180            "database_name": "admin"
2181          }
2182        },
2183        {
2184          "command_started_event": {
2185            "command": {
2186              "commitTransaction": 1,
2187              "lsid": "session0",
2188              "txnNumber": {
2189                "$numberLong": "1"
2190              },
2191              "startTransaction": null,
2192              "autocommit": false,
2193              "writeConcern": {
2194                "w": "majority",
2195                "wtimeout": 10000
2196              }
2197            },
2198            "command_name": "commitTransaction",
2199            "database_name": "admin"
2200          }
2201        }
2202      ],
2203      "outcome": {
2204        "collection": {
2205          "data": [
2206            {
2207              "_id": 1
2208            }
2209          ]
2210        }
2211      }
2212    },
2213    {
2214      "description": "commitTransaction succeeds after WriteConcernError ShutdownInProgress",
2215      "failPoint": {
2216        "configureFailPoint": "failCommand",
2217        "mode": {
2218          "times": 1
2219        },
2220        "data": {
2221          "failCommands": [
2222            "commitTransaction"
2223          ],
2224          "writeConcernError": {
2225            "code": 91,
2226            "errorLabels": [
2227              "RetryableWriteError"
2228            ],
2229            "errmsg": "Replication is being shut down"
2230          }
2231        }
2232      },
2233      "operations": [
2234        {
2235          "name": "startTransaction",
2236          "object": "session0",
2237          "arguments": {
2238            "options": {
2239              "writeConcern": {
2240                "w": "majority"
2241              }
2242            }
2243          }
2244        },
2245        {
2246          "name": "insertOne",
2247          "object": "collection",
2248          "arguments": {
2249            "session": "session0",
2250            "document": {
2251              "_id": 1
2252            }
2253          },
2254          "result": {
2255            "insertedId": 1
2256          }
2257        },
2258        {
2259          "name": "commitTransaction",
2260          "object": "session0"
2261        }
2262      ],
2263      "expectations": [
2264        {
2265          "command_started_event": {
2266            "command": {
2267              "insert": "test",
2268              "documents": [
2269                {
2270                  "_id": 1
2271                }
2272              ],
2273              "ordered": true,
2274              "readConcern": null,
2275              "lsid": "session0",
2276              "txnNumber": {
2277                "$numberLong": "1"
2278              },
2279              "startTransaction": true,
2280              "autocommit": false,
2281              "writeConcern": null
2282            },
2283            "command_name": "insert",
2284            "database_name": "transaction-tests"
2285          }
2286        },
2287        {
2288          "command_started_event": {
2289            "command": {
2290              "commitTransaction": 1,
2291              "lsid": "session0",
2292              "txnNumber": {
2293                "$numberLong": "1"
2294              },
2295              "startTransaction": null,
2296              "autocommit": false,
2297              "writeConcern": {
2298                "w": "majority"
2299              }
2300            },
2301            "command_name": "commitTransaction",
2302            "database_name": "admin"
2303          }
2304        },
2305        {
2306          "command_started_event": {
2307            "command": {
2308              "commitTransaction": 1,
2309              "lsid": "session0",
2310              "txnNumber": {
2311                "$numberLong": "1"
2312              },
2313              "startTransaction": null,
2314              "autocommit": false,
2315              "writeConcern": {
2316                "w": "majority",
2317                "wtimeout": 10000
2318              }
2319            },
2320            "command_name": "commitTransaction",
2321            "database_name": "admin"
2322          }
2323        }
2324      ],
2325      "outcome": {
2326        "collection": {
2327          "data": [
2328            {
2329              "_id": 1
2330            }
2331          ]
2332        }
2333      }
2334    }
2335  ]
2336}
2337