945 lines
23 KiB
JSON
945 lines
23 KiB
JSON
{
|
|
"description": "changeStreams-db.coll.watch-serverErrors",
|
|
"schemaVersion": "1.9",
|
|
"runOnRequirements": [
|
|
{
|
|
"minServerVersion": "4.0",
|
|
"topologies": [
|
|
"replicaset"
|
|
]
|
|
},
|
|
{
|
|
"minServerVersion": "4.1.7",
|
|
"serverless": "forbid",
|
|
"topologies": [
|
|
"sharded",
|
|
"load-balanced"
|
|
]
|
|
}
|
|
],
|
|
"createEntities": [
|
|
{
|
|
"client": {
|
|
"id": "client0",
|
|
"useMultipleMongoses": false,
|
|
"observeEvents": [
|
|
"commandStartedEvent"
|
|
],
|
|
"ignoreCommandMonitoringEvents": [
|
|
"killCursors"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"database": {
|
|
"id": "database0",
|
|
"client": "client0",
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"collection": {
|
|
"id": "collection0",
|
|
"database": "database0",
|
|
"collectionName": "coll"
|
|
}
|
|
}
|
|
],
|
|
"initialData": [
|
|
{
|
|
"collectionName": "coll",
|
|
"databaseName": "retryable-reads-tests",
|
|
"documents": []
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"description": "db.coll.watch succeeds after InterruptedAtShutdown",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 11600
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after InterruptedDueToReplStateChange",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 11602
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after NotWritablePrimary",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 10107
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after NotPrimaryNoSecondaryOk",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 13435
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after NotPrimaryOrSecondary",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 13436
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after PrimarySteppedDown",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 189
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after ShutdownInProgress",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 91
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after HostNotFound",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 7
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after HostUnreachable",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 6
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after NetworkTimeout",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 89
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch succeeds after SocketException",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 9001
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch fails after two NotWritablePrimary errors",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 2
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 10107
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection0",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
},
|
|
"expectError": {
|
|
"isError": true
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "db.coll.watch fails after NotWritablePrimary when retryReads is false",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "createEntities",
|
|
"arguments": {
|
|
"entities": [
|
|
{
|
|
"client": {
|
|
"id": "client1",
|
|
"useMultipleMongoses": false,
|
|
"uriOptions": {
|
|
"retryReads": false
|
|
},
|
|
"observeEvents": [
|
|
"commandStartedEvent"
|
|
],
|
|
"ignoreCommandMonitoringEvents": [
|
|
"killCursors"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"database": {
|
|
"id": "database1",
|
|
"client": "client1",
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
},
|
|
{
|
|
"collection": {
|
|
"id": "collection1",
|
|
"database": "database1",
|
|
"collectionName": "coll"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client1",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"aggregate"
|
|
],
|
|
"errorCode": 10107
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "collection1",
|
|
"name": "createChangeStream",
|
|
"arguments": {
|
|
"pipeline": []
|
|
},
|
|
"expectError": {
|
|
"isError": true
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client1",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"aggregate": "coll",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {}
|
|
}
|
|
]
|
|
},
|
|
"databaseName": "retryable-reads-tests"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|