Co-authored-by: Steven Silvester <steve.silvester@mongodb.com> Co-authored-by: Shane Harvey <shnhrv@gmail.com> Co-authored-by: Steven Silvester <steven.silvester@ieee.org> Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com> Co-authored-by: Casey Clements <caseyclements@users.noreply.github.com> Co-authored-by: Sergey Zelenov <mail@zelenov.su> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
254 lines
5.4 KiB
JSON
254 lines
5.4 KiB
JSON
{
|
|
"description": "getMore-retried-backpressure",
|
|
"schemaVersion": "1.3",
|
|
"runOnRequirements": [
|
|
{
|
|
"minServerVersion": "4.4"
|
|
}
|
|
],
|
|
"createEntities": [
|
|
{
|
|
"client": {
|
|
"id": "client0",
|
|
"useMultipleMongoses": false,
|
|
"observeEvents": [
|
|
"commandStartedEvent",
|
|
"commandFailedEvent",
|
|
"commandSucceededEvent"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"client": {
|
|
"id": "failPointClient",
|
|
"useMultipleMongoses": false
|
|
}
|
|
},
|
|
{
|
|
"database": {
|
|
"id": "db",
|
|
"client": "client0",
|
|
"databaseName": "default"
|
|
}
|
|
},
|
|
{
|
|
"collection": {
|
|
"id": "coll",
|
|
"database": "db",
|
|
"collectionName": "default"
|
|
}
|
|
}
|
|
],
|
|
"initialData": [
|
|
{
|
|
"databaseName": "default",
|
|
"collectionName": "default",
|
|
"documents": [
|
|
{
|
|
"a": 1
|
|
},
|
|
{
|
|
"a": 2
|
|
},
|
|
{
|
|
"a": 3
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"description": "getMores are retried",
|
|
"operations": [
|
|
{
|
|
"name": "failPoint",
|
|
"object": "testRunner",
|
|
"arguments": {
|
|
"client": "failPointClient",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 2
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"getMore"
|
|
],
|
|
"errorLabels": [
|
|
"RetryableError",
|
|
"SystemOverloadedError"
|
|
],
|
|
"errorCode": 2
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "find",
|
|
"object": "coll",
|
|
"arguments": {
|
|
"batchSize": 2,
|
|
"filter": {},
|
|
"sort": {
|
|
"a": 1
|
|
}
|
|
},
|
|
"expectResult": [
|
|
{
|
|
"a": 1
|
|
},
|
|
{
|
|
"a": 2
|
|
},
|
|
{
|
|
"a": 3
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "find"
|
|
}
|
|
},
|
|
{
|
|
"commandSucceededEvent": {
|
|
"commandName": "find"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandFailedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandFailedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandSucceededEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "getMores are retried maxAttempts=2 times",
|
|
"operations": [
|
|
{
|
|
"name": "failPoint",
|
|
"object": "testRunner",
|
|
"arguments": {
|
|
"client": "failPointClient",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": "alwaysOn",
|
|
"data": {
|
|
"failCommands": [
|
|
"getMore"
|
|
],
|
|
"errorLabels": [
|
|
"RetryableError",
|
|
"SystemOverloadedError"
|
|
],
|
|
"errorCode": 2
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "find",
|
|
"arguments": {
|
|
"batchSize": 2,
|
|
"filter": {}
|
|
},
|
|
"object": "coll",
|
|
"expectError": {
|
|
"isError": true,
|
|
"isClientError": false
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "find"
|
|
}
|
|
},
|
|
{
|
|
"commandSucceededEvent": {
|
|
"commandName": "find"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandFailedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandFailedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandFailedEvent": {
|
|
"commandName": "getMore"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"commandName": "killCursors"
|
|
}
|
|
},
|
|
{
|
|
"commandSucceededEvent": {
|
|
"commandName": "killCursors"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|