|
| 1 | +{ |
| 2 | + "description": "retryable-abort-2", |
| 3 | + "schemaVersion": "1.3", |
| 4 | + "runOnRequirements": [ |
| 5 | + { |
| 6 | + "minServerVersion": "4.4", |
| 7 | + "topologies": [ |
| 8 | + "replicaset", |
| 9 | + "sharded", |
| 10 | + "load-balanced" |
| 11 | + ] |
| 12 | + } |
| 13 | + ], |
| 14 | + "createEntities": [ |
| 15 | + { |
| 16 | + "client": { |
| 17 | + "id": "client0", |
| 18 | + "useMultipleMongoses": false, |
| 19 | + "observeEvents": [ |
| 20 | + "commandStartedEvent" |
| 21 | + ] |
| 22 | + } |
| 23 | + }, |
| 24 | + { |
| 25 | + "database": { |
| 26 | + "id": "database0", |
| 27 | + "client": "client0", |
| 28 | + "databaseName": "transaction-tests" |
| 29 | + } |
| 30 | + }, |
| 31 | + { |
| 32 | + "collection": { |
| 33 | + "id": "collection0", |
| 34 | + "database": "database0", |
| 35 | + "collectionName": "test" |
| 36 | + } |
| 37 | + }, |
| 38 | + { |
| 39 | + "session": { |
| 40 | + "id": "session0", |
| 41 | + "client": "client0" |
| 42 | + } |
| 43 | + } |
| 44 | + ], |
| 45 | + "initialData": [ |
| 46 | + { |
| 47 | + "collectionName": "test", |
| 48 | + "databaseName": "transaction-tests", |
| 49 | + "documents": [] |
| 50 | + } |
| 51 | + ], |
| 52 | + "tests": [ |
| 53 | + { |
| 54 | + "description": "abortTransaction retries if backpressure labels are added", |
| 55 | + "operations": [ |
| 56 | + { |
| 57 | + "object": "testRunner", |
| 58 | + "name": "failPoint", |
| 59 | + "arguments": { |
| 60 | + "client": "client0", |
| 61 | + "failPoint": { |
| 62 | + "configureFailPoint": "failCommand", |
| 63 | + "mode": { |
| 64 | + "times": 2 |
| 65 | + }, |
| 66 | + "data": { |
| 67 | + "failCommands": [ |
| 68 | + "abortTransaction" |
| 69 | + ], |
| 70 | + "errorLabels": [ |
| 71 | + "RetryableError", |
| 72 | + "SystemOverloadedError" |
| 73 | + ], |
| 74 | + "errorCode": 112 |
| 75 | + } |
| 76 | + } |
| 77 | + } |
| 78 | + }, |
| 79 | + { |
| 80 | + "object": "session0", |
| 81 | + "name": "startTransaction" |
| 82 | + }, |
| 83 | + { |
| 84 | + "object": "collection0", |
| 85 | + "name": "insertOne", |
| 86 | + "arguments": { |
| 87 | + "session": "session0", |
| 88 | + "document": { |
| 89 | + "_id": 1 |
| 90 | + } |
| 91 | + }, |
| 92 | + "expectResult": { |
| 93 | + "$$unsetOrMatches": { |
| 94 | + "insertedId": { |
| 95 | + "$$unsetOrMatches": 1 |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | + }, |
| 100 | + { |
| 101 | + "object": "session0", |
| 102 | + "name": "abortTransaction" |
| 103 | + } |
| 104 | + ], |
| 105 | + "expectEvents": [ |
| 106 | + { |
| 107 | + "client": "client0", |
| 108 | + "events": [ |
| 109 | + { |
| 110 | + "commandStartedEvent": { |
| 111 | + "command": { |
| 112 | + "insert": "test", |
| 113 | + "documents": [ |
| 114 | + { |
| 115 | + "_id": 1 |
| 116 | + } |
| 117 | + ], |
| 118 | + "ordered": true, |
| 119 | + "readConcern": { |
| 120 | + "$$exists": false |
| 121 | + }, |
| 122 | + "lsid": { |
| 123 | + "$$sessionLsid": "session0" |
| 124 | + }, |
| 125 | + "txnNumber": { |
| 126 | + "$numberLong": "1" |
| 127 | + }, |
| 128 | + "startTransaction": true, |
| 129 | + "autocommit": false, |
| 130 | + "writeConcern": { |
| 131 | + "$$exists": false |
| 132 | + } |
| 133 | + }, |
| 134 | + "commandName": "insert", |
| 135 | + "databaseName": "transaction-tests" |
| 136 | + } |
| 137 | + }, |
| 138 | + { |
| 139 | + "commandStartedEvent": { |
| 140 | + "command": { |
| 141 | + "abortTransaction": 1, |
| 142 | + "lsid": { |
| 143 | + "$$sessionLsid": "session0" |
| 144 | + }, |
| 145 | + "txnNumber": { |
| 146 | + "$numberLong": "1" |
| 147 | + }, |
| 148 | + "startTransaction": { |
| 149 | + "$$exists": false |
| 150 | + }, |
| 151 | + "autocommit": false, |
| 152 | + "writeConcern": { |
| 153 | + "$$exists": false |
| 154 | + } |
| 155 | + }, |
| 156 | + "commandName": "abortTransaction", |
| 157 | + "databaseName": "admin" |
| 158 | + } |
| 159 | + }, |
| 160 | + { |
| 161 | + "commandStartedEvent": { |
| 162 | + "command": { |
| 163 | + "abortTransaction": 1, |
| 164 | + "lsid": { |
| 165 | + "$$sessionLsid": "session0" |
| 166 | + }, |
| 167 | + "txnNumber": { |
| 168 | + "$numberLong": "1" |
| 169 | + }, |
| 170 | + "startTransaction": { |
| 171 | + "$$exists": false |
| 172 | + }, |
| 173 | + "autocommit": false, |
| 174 | + "writeConcern": { |
| 175 | + "$$exists": false |
| 176 | + } |
| 177 | + }, |
| 178 | + "commandName": "abortTransaction", |
| 179 | + "databaseName": "admin" |
| 180 | + } |
| 181 | + }, |
| 182 | + { |
| 183 | + "commandStartedEvent": { |
| 184 | + "command": { |
| 185 | + "abortTransaction": 1, |
| 186 | + "lsid": { |
| 187 | + "$$sessionLsid": "session0" |
| 188 | + }, |
| 189 | + "txnNumber": { |
| 190 | + "$numberLong": "1" |
| 191 | + }, |
| 192 | + "startTransaction": { |
| 193 | + "$$exists": false |
| 194 | + }, |
| 195 | + "autocommit": false, |
| 196 | + "writeConcern": { |
| 197 | + "$$exists": false |
| 198 | + } |
| 199 | + }, |
| 200 | + "commandName": "abortTransaction", |
| 201 | + "databaseName": "admin" |
| 202 | + } |
| 203 | + } |
| 204 | + ] |
| 205 | + } |
| 206 | + ], |
| 207 | + "outcome": [ |
| 208 | + { |
| 209 | + "collectionName": "test", |
| 210 | + "databaseName": "transaction-tests", |
| 211 | + "documents": [] |
| 212 | + } |
| 213 | + ] |
| 214 | + }, |
| 215 | + { |
| 216 | + "description": "abortTransaction is retried maxAttempts=5 times if backpressure labels are added", |
| 217 | + "operations": [ |
| 218 | + { |
| 219 | + "object": "testRunner", |
| 220 | + "name": "failPoint", |
| 221 | + "arguments": { |
| 222 | + "client": "client0", |
| 223 | + "failPoint": { |
| 224 | + "configureFailPoint": "failCommand", |
| 225 | + "mode": "alwaysOn", |
| 226 | + "data": { |
| 227 | + "failCommands": [ |
| 228 | + "abortTransaction" |
| 229 | + ], |
| 230 | + "errorLabels": [ |
| 231 | + "RetryableError", |
| 232 | + "SystemOverloadedError" |
| 233 | + ], |
| 234 | + "errorCode": 112 |
| 235 | + } |
| 236 | + } |
| 237 | + } |
| 238 | + }, |
| 239 | + { |
| 240 | + "object": "session0", |
| 241 | + "name": "startTransaction" |
| 242 | + }, |
| 243 | + { |
| 244 | + "object": "collection0", |
| 245 | + "name": "insertOne", |
| 246 | + "arguments": { |
| 247 | + "session": "session0", |
| 248 | + "document": { |
| 249 | + "_id": 1 |
| 250 | + } |
| 251 | + }, |
| 252 | + "expectResult": { |
| 253 | + "$$unsetOrMatches": { |
| 254 | + "insertedId": { |
| 255 | + "$$unsetOrMatches": 1 |
| 256 | + } |
| 257 | + } |
| 258 | + } |
| 259 | + }, |
| 260 | + { |
| 261 | + "object": "session0", |
| 262 | + "name": "abortTransaction" |
| 263 | + } |
| 264 | + ], |
| 265 | + "expectEvents": [ |
| 266 | + { |
| 267 | + "client": "client0", |
| 268 | + "events": [ |
| 269 | + { |
| 270 | + "commandStartedEvent": { |
| 271 | + "command": { |
| 272 | + "insert": "test", |
| 273 | + "documents": [ |
| 274 | + { |
| 275 | + "_id": 1 |
| 276 | + } |
| 277 | + ], |
| 278 | + "ordered": true, |
| 279 | + "readConcern": { |
| 280 | + "$$exists": false |
| 281 | + }, |
| 282 | + "lsid": { |
| 283 | + "$$sessionLsid": "session0" |
| 284 | + }, |
| 285 | + "txnNumber": { |
| 286 | + "$numberLong": "1" |
| 287 | + }, |
| 288 | + "startTransaction": true, |
| 289 | + "autocommit": false, |
| 290 | + "writeConcern": { |
| 291 | + "$$exists": false |
| 292 | + } |
| 293 | + }, |
| 294 | + "commandName": "insert", |
| 295 | + "databaseName": "transaction-tests" |
| 296 | + } |
| 297 | + }, |
| 298 | + { |
| 299 | + "commandStartedEvent": { |
| 300 | + "command": { |
| 301 | + "abortTransaction": 1, |
| 302 | + "lsid": { |
| 303 | + "$$sessionLsid": "session0" |
| 304 | + }, |
| 305 | + "txnNumber": { |
| 306 | + "$numberLong": "1" |
| 307 | + }, |
| 308 | + "startTransaction": { |
| 309 | + "$$exists": false |
| 310 | + }, |
| 311 | + "autocommit": false, |
| 312 | + "writeConcern": { |
| 313 | + "$$exists": false |
| 314 | + } |
| 315 | + }, |
| 316 | + "commandName": "abortTransaction", |
| 317 | + "databaseName": "admin" |
| 318 | + } |
| 319 | + }, |
| 320 | + { |
| 321 | + "commandStartedEvent": { |
| 322 | + "commandName": "abortTransaction" |
| 323 | + } |
| 324 | + }, |
| 325 | + { |
| 326 | + "commandStartedEvent": { |
| 327 | + "commandName": "abortTransaction" |
| 328 | + } |
| 329 | + }, |
| 330 | + { |
| 331 | + "commandStartedEvent": { |
| 332 | + "commandName": "abortTransaction" |
| 333 | + } |
| 334 | + }, |
| 335 | + { |
| 336 | + "commandStartedEvent": { |
| 337 | + "commandName": "abortTransaction" |
| 338 | + } |
| 339 | + }, |
| 340 | + { |
| 341 | + "commandStartedEvent": { |
| 342 | + "commandName": "abortTransaction" |
| 343 | + } |
| 344 | + } |
| 345 | + ] |
| 346 | + } |
| 347 | + ], |
| 348 | + "outcome": [ |
| 349 | + { |
| 350 | + "collectionName": "test", |
| 351 | + "databaseName": "transaction-tests", |
| 352 | + "documents": [] |
| 353 | + } |
| 354 | + ] |
| 355 | + } |
| 356 | + ] |
| 357 | +} |
0 commit comments