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