Compare commits

...

1 Commits

Author SHA1 Message Date
Cloud User
9d56075c93 resyncing specs 12-29-2025 2025-12-29 16:01:37 +00:00
9 changed files with 48 additions and 1125 deletions

View File

@ -1,6 +1,6 @@
{
"description": "timeoutMS behaves correctly during command execution",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4.7",
@ -69,10 +69,8 @@
"appName": "reduceMaxTimeMSTest",
"w": 1,
"timeoutMS": 500,
"heartbeatFrequencyMS": 500,
"minPoolSize": 1
"heartbeatFrequencyMS": 500
},
"awaitMinPoolSizeMS": 10000,
"observeEvents": [
"commandStartedEvent"
]
@ -187,10 +185,8 @@
"appName": "rttTooHighTest",
"w": 1,
"timeoutMS": 10,
"heartbeatFrequencyMS": 500,
"minPoolSize": 1
"heartbeatFrequencyMS": 500
},
"awaitMinPoolSizeMS": 10000,
"observeEvents": [
"commandStartedEvent"
]
@ -320,10 +316,8 @@
"appName": "reduceMaxTimeMSTest",
"w": 1,
"timeoutMS": 90,
"heartbeatFrequencyMS": 100000,
"minPoolSize": 1
"heartbeatFrequencyMS": 100000
},
"awaitMinPoolSizeMS": 10000,
"observeEvents": [
"commandStartedEvent"
]

View File

@ -1,6 +1,6 @@
{
"description": "timeoutMS behaves correctly for the withTransaction API",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4",
@ -21,10 +21,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 500,
"minPoolSize": 1
"timeoutMS": 500
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"

View File

@ -1,6 +1,6 @@
{
"description": "MaxTimeMSExpired server errors are transformed into a custom timeout error",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.0",
@ -26,10 +26,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"

View File

@ -1,6 +1,6 @@
{
"description": "timeoutMS can be configured on a MongoClient",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4",
@ -38,10 +38,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -219,10 +217,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -394,10 +390,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -575,10 +569,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -770,10 +762,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -951,10 +941,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -1132,10 +1120,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -1319,10 +1305,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -1500,10 +1484,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -1681,10 +1663,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -1862,10 +1842,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2043,10 +2021,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2218,10 +2194,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2401,10 +2375,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2582,10 +2554,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2763,10 +2733,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -2938,10 +2906,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -3113,10 +3079,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -3294,10 +3258,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -3479,10 +3441,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -3668,10 +3628,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -3849,10 +3807,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4030,10 +3986,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4217,10 +4171,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4408,10 +4360,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4599,10 +4549,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4780,10 +4728,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -4967,10 +4913,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -5158,10 +5102,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -5355,10 +5297,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -5542,10 +5482,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
@ -5739,10 +5677,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 250,
"minPoolSize": 1
"timeoutMS": 250
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"

View File

@ -1,6 +1,6 @@
{
"description": "timeoutMS behaves correctly for non-tailable cursors",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4"
@ -17,10 +17,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 200,
"minPoolSize": 1
"timeoutMS": 200
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"

View File

@ -1,6 +1,6 @@
{
"description": "timeoutMS behaves correctly for retryable operations",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.0",
@ -26,10 +26,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 100,
"minPoolSize": 1
"timeoutMS": 100
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"

View File

@ -1,6 +1,6 @@
{
"description": "runCursorCommand",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4"
@ -16,10 +16,6 @@
{
"client": {
"id": "commandClient",
"uriOptions": {
"minPoolSize": 1
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent",

View File

@ -1,6 +1,6 @@
{
"description": "sessions inherit timeoutMS from their parent MongoClient",
"schemaVersion": "1.26",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4",
@ -21,10 +21,8 @@
"client": {
"id": "client",
"uriOptions": {
"timeoutMS": 500,
"minPoolSize": 1
"timeoutMS": 500
},
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent",

View File

@ -1,993 +0,0 @@
{
"description": "snapshot-sessions",
"schemaVersion": "1.0",
"runOnRequirements": [
{
"minServerVersion": "5.0",
"topologies": [
"replicaset",
"sharded"
]
}
],
"createEntities": [
{
"client": {
"id": "client0",
"observeEvents": [
"commandStartedEvent"
],
"ignoreCommandMonitoringEvents": [
"findAndModify",
"insert",
"update"
]
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "database0"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "collection0",
"collectionOptions": {
"writeConcern": {
"w": "majority"
}
}
}
},
{
"session": {
"id": "session0",
"client": "client0",
"sessionOptions": {
"snapshot": true
}
}
},
{
"session": {
"id": "session1",
"client": "client0",
"sessionOptions": {
"snapshot": true
}
}
}
],
"initialData": [
{
"collectionName": "collection0",
"databaseName": "database0",
"documents": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 11
}
]
}
],
"tests": [
{
"description": "Find operation with snapshot",
"operations": [
{
"name": "find",
"object": "collection0",
"arguments": {
"session": "session0",
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 1,
"x": 12
}
},
{
"name": "find",
"object": "collection0",
"arguments": {
"session": "session1",
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 12
}
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 1,
"x": 13
}
},
{
"name": "find",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 13
}
]
},
{
"name": "find",
"object": "collection0",
"arguments": {
"session": "session0",
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "find",
"object": "collection0",
"arguments": {
"session": "session1",
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 12
}
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"$$exists": false
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "Distinct operation with snapshot",
"operations": [
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {},
"session": "session0"
},
"expectResult": [
11
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 2
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 2,
"x": 12
}
},
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {},
"session": "session1"
},
"expectResult": [
11,
12
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 2
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 2,
"x": 13
}
},
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {}
},
"expectResult": [
11,
13
]
},
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {},
"session": "session0"
},
"expectResult": [
11
]
},
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {},
"session": "session1"
},
"expectResult": [
11,
12
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"$$exists": false
}
}
}
},
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "Aggregate operation with snapshot",
"operations": [
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
],
"session": "session0"
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 1,
"x": 12
}
},
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
],
"session": "session1"
},
"expectResult": [
{
"_id": 1,
"x": 12
}
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 1,
"x": 13
}
},
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
]
},
"expectResult": [
{
"_id": 1,
"x": 13
}
]
},
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
],
"session": "session0"
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
],
"session": "session1"
},
"expectResult": [
{
"_id": 1,
"x": 12
}
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"$$exists": false
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "countDocuments operation with snapshot",
"operations": [
{
"name": "countDocuments",
"object": "collection0",
"arguments": {
"filter": {},
"session": "session0"
},
"expectResult": 2
},
{
"name": "countDocuments",
"object": "collection0",
"arguments": {
"filter": {},
"session": "session0"
},
"expectResult": 2
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "Mixed operation with snapshot",
"operations": [
{
"name": "find",
"object": "collection0",
"arguments": {
"session": "session0",
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "findOneAndUpdate",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
},
"returnDocument": "After"
},
"expectResult": {
"_id": 1,
"x": 12
}
},
{
"name": "find",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
}
},
"expectResult": [
{
"_id": 1,
"x": 12
}
]
},
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
],
"session": "session0"
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
},
{
"name": "distinct",
"object": "collection0",
"arguments": {
"fieldName": "x",
"filter": {},
"session": "session0"
},
"expectResult": [
11
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"$$exists": false
}
}
}
},
{
"commandStartedEvent": {
"command": {
"aggregate": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"distinct": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "Write commands with snapshot session do not affect snapshot reads",
"operations": [
{
"name": "find",
"object": "collection0",
"arguments": {
"filter": {},
"session": "session0"
}
},
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"document": {
"_id": 22,
"x": 33
}
}
},
{
"name": "updateOne",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$inc": {
"x": 1
}
}
}
},
{
"name": "find",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"session": "session0"
},
"expectResult": [
{
"_id": 1,
"x": 11
}
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
}
}
},
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": true
}
}
}
}
}
]
}
]
},
{
"description": "First snapshot read does not send atClusterTime",
"operations": [
{
"name": "find",
"object": "collection0",
"arguments": {
"filter": {},
"session": "session0"
}
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"find": "collection0",
"readConcern": {
"level": "snapshot",
"atClusterTime": {
"$$exists": false
}
}
},
"commandName": "find",
"databaseName": "database0"
}
}
]
}
]
},
{
"description": "StartTransaction fails in snapshot session",
"operations": [
{
"name": "startTransaction",
"object": "session0",
"expectError": {
"isError": true,
"isClientError": true,
"errorContains": "Transactions are not supported in snapshot sessions"
}
}
]
}
]
}