| 1 |
runOn: |
| 2 |
- |
| 3 |
minServerVersion: "4.3.1" |
| 4 |
topology: ["replicaset", "sharded"] |
| 5 |
|
| 6 |
database_name: &database_name "transaction-tests" |
| 7 |
collection_name: &collection_name "test" |
| 8 |
|
| 9 |
data: [] |
| 10 |
|
| 11 |
tests: |
| 12 |
- description: commitTransaction does not retry error without RetryableWriteError label |
| 13 |
clientOptions: |
| 14 |
retryWrites: false |
| 15 |
failPoint: |
| 16 |
configureFailPoint: failCommand |
| 17 |
mode: { times: 1 } |
| 18 |
data: |
| 19 |
failCommands: ["commitTransaction"] |
| 20 |
errorCode: 11600 |
| 21 |
errorLabels: [] |
| 22 |
operations: |
| 23 |
- name: startTransaction |
| 24 |
object: session0 |
| 25 |
- name: insertOne |
| 26 |
object: collection |
| 27 |
arguments: |
| 28 |
session: session0 |
| 29 |
document: |
| 30 |
_id: 1 |
| 31 |
result: |
| 32 |
insertedId: 1 |
| 33 |
- name: commitTransaction |
| 34 |
object: session0 |
| 35 |
result: |
| 36 |
errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] |
| 37 |
expectations: |
| 38 |
- command_started_event: |
| 39 |
command: |
| 40 |
insert: *collection_name |
| 41 |
documents: |
| 42 |
- _id: 1 |
| 43 |
ordered: true |
| 44 |
readConcern: |
| 45 |
lsid: session0 |
| 46 |
txnNumber: |
| 47 |
$numberLong: "1" |
| 48 |
startTransaction: true |
| 49 |
autocommit: false |
| 50 |
writeConcern: |
| 51 |
command_name: insert |
| 52 |
database_name: *database_name |
| 53 |
- command_started_event: |
| 54 |
command: |
| 55 |
commitTransaction: 1 |
| 56 |
lsid: session0 |
| 57 |
txnNumber: |
| 58 |
$numberLong: "1" |
| 59 |
startTransaction: |
| 60 |
autocommit: false |
| 61 |
writeConcern: |
| 62 |
command_name: commitTransaction |
| 63 |
database_name: admin |
| 64 |
outcome: |
| 65 |
collection: |
| 66 |
data: [] |
| 67 |
|
| 68 |
- description: commitTransaction retries once with RetryableWriteError from server |
| 69 |
clientOptions: |
| 70 |
retryWrites: false |
| 71 |
failPoint: |
| 72 |
configureFailPoint: failCommand |
| 73 |
mode: { times: 1 } |
| 74 |
data: |
| 75 |
failCommands: ["commitTransaction"] |
| 76 |
errorCode: 112 |
| 77 |
errorLabels: ["RetryableWriteError"] |
| 78 |
operations: |
| 79 |
- name: startTransaction |
| 80 |
object: session0 |
| 81 |
- name: insertOne |
| 82 |
object: collection |
| 83 |
arguments: |
| 84 |
session: session0 |
| 85 |
document: |
| 86 |
_id: 1 |
| 87 |
result: |
| 88 |
insertedId: 1 |
| 89 |
- name: commitTransaction |
| 90 |
object: session0 |
| 91 |
expectations: |
| 92 |
- command_started_event: |
| 93 |
command: |
| 94 |
insert: *collection_name |
| 95 |
documents: |
| 96 |
- _id: 1 |
| 97 |
ordered: true |
| 98 |
readConcern: |
| 99 |
lsid: session0 |
| 100 |
txnNumber: |
| 101 |
$numberLong: "1" |
| 102 |
startTransaction: true |
| 103 |
autocommit: false |
| 104 |
writeConcern: |
| 105 |
command_name: insert |
| 106 |
database_name: *database_name |
| 107 |
- command_started_event: |
| 108 |
command: |
| 109 |
commitTransaction: 1 |
| 110 |
lsid: session0 |
| 111 |
txnNumber: |
| 112 |
$numberLong: "1" |
| 113 |
startTransaction: |
| 114 |
autocommit: false |
| 115 |
writeConcern: |
| 116 |
command_name: commitTransaction |
| 117 |
database_name: admin |
| 118 |
- command_started_event: |
| 119 |
command: |
| 120 |
commitTransaction: 1 |
| 121 |
lsid: session0 |
| 122 |
txnNumber: |
| 123 |
$numberLong: "1" |
| 124 |
startTransaction: |
| 125 |
autocommit: false |
| 126 |
writeConcern: { w: majority, wtimeout: 10000 } |
| 127 |
command_name: commitTransaction |
| 128 |
database_name: admin |
| 129 |
outcome: |
| 130 |
collection: |
| 131 |
data: |
| 132 |
- _id: 1 |