Compare commits
1 Commits
master
...
spec-resyn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44fd99cac4 |
357
test/transactions/unified/backpressure-retryable-abort.json
Normal file
357
test/transactions/unified/backpressure-retryable-abort.json
Normal file
@ -0,0 +1,357 @@
|
|||||||
|
{
|
||||||
|
"description": "backpressure-retryable-abort",
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"minServerVersion": "4.4",
|
||||||
|
"topologies": [
|
||||||
|
"replicaset",
|
||||||
|
"sharded",
|
||||||
|
"load-balanced"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"createEntities": [
|
||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"id": "client0",
|
||||||
|
"useMultipleMongoses": false,
|
||||||
|
"observeEvents": [
|
||||||
|
"commandStartedEvent"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"id": "database0",
|
||||||
|
"client": "client0",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collection": {
|
||||||
|
"id": "collection0",
|
||||||
|
"database": "database0",
|
||||||
|
"collectionName": "test"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"session": {
|
||||||
|
"id": "session0",
|
||||||
|
"client": "client0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialData": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"description": "abortTransaction retries if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": {
|
||||||
|
"times": 2
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"abortTransaction"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "abortTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "abortTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "abortTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "abortTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "abortTransaction is retried maxAttempts=5 times if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": "alwaysOn",
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"abortTransaction"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "abortTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "abortTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
374
test/transactions/unified/backpressure-retryable-commit.json
Normal file
374
test/transactions/unified/backpressure-retryable-commit.json
Normal file
@ -0,0 +1,374 @@
|
|||||||
|
{
|
||||||
|
"description": "backpressure-retryable-commit",
|
||||||
|
"schemaVersion": "1.4",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"minServerVersion": "4.4",
|
||||||
|
"topologies": [
|
||||||
|
"sharded",
|
||||||
|
"replicaset",
|
||||||
|
"load-balanced"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"createEntities": [
|
||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"id": "client0",
|
||||||
|
"useMultipleMongoses": false,
|
||||||
|
"observeEvents": [
|
||||||
|
"commandStartedEvent"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"id": "database0",
|
||||||
|
"client": "client0",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collection": {
|
||||||
|
"id": "collection0",
|
||||||
|
"database": "database0",
|
||||||
|
"collectionName": "test"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"session": {
|
||||||
|
"id": "session0",
|
||||||
|
"client": "client0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialData": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"description": "commitTransaction retries if backpressure labels are added",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"serverless": "forbid"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": {
|
||||||
|
"times": 2
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"commitTransaction"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "commitTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"commitTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"commitTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"commitTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "commitTransaction is retried maxAttempts=5 times if backpressure labels are added",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"serverless": "forbid"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": "alwaysOn",
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"commitTransaction"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "commitTransaction",
|
||||||
|
"expectError": {
|
||||||
|
"isError": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"commitTransaction": 1,
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "commitTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "commitTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "commitTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "commitTransaction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "commitTransaction"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
328
test/transactions/unified/backpressure-retryable-reads.json
Normal file
328
test/transactions/unified/backpressure-retryable-reads.json
Normal file
@ -0,0 +1,328 @@
|
|||||||
|
{
|
||||||
|
"description": "backpressure-retryable-reads",
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"minServerVersion": "4.4",
|
||||||
|
"topologies": [
|
||||||
|
"replicaset",
|
||||||
|
"sharded",
|
||||||
|
"load-balanced"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"createEntities": [
|
||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"id": "client0",
|
||||||
|
"useMultipleMongoses": false,
|
||||||
|
"observeEvents": [
|
||||||
|
"commandStartedEvent"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"id": "database0",
|
||||||
|
"client": "client0",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collection": {
|
||||||
|
"id": "collection0",
|
||||||
|
"database": "database0",
|
||||||
|
"collectionName": "test"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"session": {
|
||||||
|
"id": "session0",
|
||||||
|
"client": "client0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialData": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"description": "reads are retried if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": {
|
||||||
|
"times": 1
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"find"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "find",
|
||||||
|
"arguments": {
|
||||||
|
"filter": {},
|
||||||
|
"session": "session0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "commitTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"find": "test",
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "find",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"find": "test",
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "find",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "reads are retried maxAttempts=5 times if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": "alwaysOn",
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"find"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "find",
|
||||||
|
"arguments": {
|
||||||
|
"filter": {},
|
||||||
|
"session": "session0"
|
||||||
|
},
|
||||||
|
"expectError": {
|
||||||
|
"isError": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "abortTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "find"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
454
test/transactions/unified/backpressure-retryable-writes.json
Normal file
454
test/transactions/unified/backpressure-retryable-writes.json
Normal file
@ -0,0 +1,454 @@
|
|||||||
|
{
|
||||||
|
"description": "backpressure-retryable-writes",
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"runOnRequirements": [
|
||||||
|
{
|
||||||
|
"minServerVersion": "4.4",
|
||||||
|
"topologies": [
|
||||||
|
"replicaset",
|
||||||
|
"sharded",
|
||||||
|
"load-balanced"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"createEntities": [
|
||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"id": "client0",
|
||||||
|
"useMultipleMongoses": false,
|
||||||
|
"observeEvents": [
|
||||||
|
"commandStartedEvent"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"id": "database0",
|
||||||
|
"client": "client0",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collection": {
|
||||||
|
"id": "collection0",
|
||||||
|
"database": "database0",
|
||||||
|
"collectionName": "test"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"session": {
|
||||||
|
"id": "session0",
|
||||||
|
"client": "client0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialData": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"description": "writes are retried if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": {
|
||||||
|
"times": 1
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"insert"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "commitTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": true,
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"insert": "test",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered": true,
|
||||||
|
"readConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"abortTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"lsid": {
|
||||||
|
"$$sessionLsid": "session0"
|
||||||
|
},
|
||||||
|
"txnNumber": {
|
||||||
|
"$numberLong": "1"
|
||||||
|
},
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
},
|
||||||
|
"autocommit": false,
|
||||||
|
"writeConcern": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "commitTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": [
|
||||||
|
{
|
||||||
|
"_id": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "writes are retried maxAttempts=5 times if backpressure labels are added",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectResult": {
|
||||||
|
"$$unsetOrMatches": {
|
||||||
|
"insertedId": {
|
||||||
|
"$$unsetOrMatches": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": "alwaysOn",
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"insert"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expectError": {
|
||||||
|
"isError": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "abortTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "insert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"commandName": "abortTransaction"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "retry succeeds if backpressure labels are added to the first operation in a transaction",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "startTransaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "testRunner",
|
||||||
|
"name": "failPoint",
|
||||||
|
"arguments": {
|
||||||
|
"client": "client0",
|
||||||
|
"failPoint": {
|
||||||
|
"configureFailPoint": "failCommand",
|
||||||
|
"mode": {
|
||||||
|
"times": 1
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"failCommands": [
|
||||||
|
"insert"
|
||||||
|
],
|
||||||
|
"errorLabels": [
|
||||||
|
"RetryableError",
|
||||||
|
"SystemOverloadedError"
|
||||||
|
],
|
||||||
|
"errorCode": 112
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "collection0",
|
||||||
|
"name": "insertOne",
|
||||||
|
"arguments": {
|
||||||
|
"session": "session0",
|
||||||
|
"document": {
|
||||||
|
"_id": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"object": "session0",
|
||||||
|
"name": "abortTransaction"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expectEvents": [
|
||||||
|
{
|
||||||
|
"client": "client0",
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"startTransaction": true
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"startTransaction": true
|
||||||
|
},
|
||||||
|
"commandName": "insert",
|
||||||
|
"databaseName": "transaction-tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"commandStartedEvent": {
|
||||||
|
"command": {
|
||||||
|
"startTransaction": {
|
||||||
|
"$$exists": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commandName": "abortTransaction",
|
||||||
|
"databaseName": "admin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outcome": [
|
||||||
|
{
|
||||||
|
"collectionName": "test",
|
||||||
|
"databaseName": "transaction-tests",
|
||||||
|
"documents": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
35
test/uri_options/client-backpressure-options.json
Normal file
35
test/uri_options/client-backpressure-options.json
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"description": "adaptiveRetries=true is parsed correctly",
|
||||||
|
"uri": "mongodb://example.com/?adaptiveRetries=true",
|
||||||
|
"valid": true,
|
||||||
|
"warning": false,
|
||||||
|
"hosts": null,
|
||||||
|
"auth": null,
|
||||||
|
"options": {
|
||||||
|
"adaptiveRetries": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "adaptiveRetries=false is parsed correctly",
|
||||||
|
"uri": "mongodb://example.com/?adaptiveRetries=false",
|
||||||
|
"valid": true,
|
||||||
|
"warning": false,
|
||||||
|
"hosts": null,
|
||||||
|
"auth": null,
|
||||||
|
"options": {
|
||||||
|
"adaptiveRetries": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "adaptiveRetries with invalid value causes a warning",
|
||||||
|
"uri": "mongodb://example.com/?adaptiveRetries=invalid",
|
||||||
|
"valid": true,
|
||||||
|
"warning": true,
|
||||||
|
"hosts": null,
|
||||||
|
"auth": null,
|
||||||
|
"options": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user