resyncing specs 03-02-2026

This commit is contained in:
Cloud User 2026-03-02 16:01:17 +00:00
parent 84814b2a72
commit 5c7c50441a
15 changed files with 1356 additions and 2 deletions

View File

@ -27,7 +27,8 @@
"awaitMinPoolSizeMS": 10000,
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
"commandStartedEvent",
"commandFailedEvent"
]
}
},
@ -188,6 +189,11 @@
}
}
},
{
"commandFailedEvent": {
"commandName": "insert"
}
},
{
"commandStartedEvent": {
"commandName": "abortTransaction",
@ -206,6 +212,105 @@
]
}
]
},
{
"description": "withTransaction surfaces a timeout after exhausting transient transaction retries, retaining the last transient error as the timeout cause.",
"operations": [
{
"name": "failPoint",
"object": "testRunner",
"arguments": {
"client": "failPointClient",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": "alwaysOn",
"data": {
"failCommands": [
"insert"
],
"blockConnection": true,
"blockTimeMS": 25,
"errorCode": 24,
"errorLabels": [
"TransientTransactionError"
]
}
}
}
},
{
"name": "withTransaction",
"object": "session",
"arguments": {
"callback": [
{
"name": "insertOne",
"object": "collection",
"arguments": {
"document": {
"_id": 1
},
"session": "session"
},
"expectError": {
"isError": true
}
}
]
},
"expectError": {
"isTimeoutError": true
}
}
],
"expectEvents": [
{
"client": "client",
"ignoreExtraEvents": true,
"events": [
{
"commandStartedEvent": {
"commandName": "insert"
}
},
{
"commandFailedEvent": {
"commandName": "insert"
}
},
{
"commandStartedEvent": {
"commandName": "abortTransaction"
}
},
{
"commandFailedEvent": {
"commandName": "abortTransaction"
}
},
{
"commandStartedEvent": {
"commandName": "insert"
}
},
{
"commandFailedEvent": {
"commandName": "insert"
}
},
{
"commandStartedEvent": {
"commandName": "abortTransaction"
}
},
{
"commandFailedEvent": {
"commandName": "abortTransaction"
}
}
]
}
]
}
]
}

View File

@ -85,7 +85,7 @@
}
},
{
"description": "Mark server unknown on network timeout application error (beforeHandshakeCompletes)",
"description": "Ignore network timeout application error (beforeHandshakeCompletes)",
"applicationErrors": [
{
"address": "a:27017",

View File

@ -0,0 +1,167 @@
{
"description": "Static setVersion (DSC) is compatible with both pre and post DRIVERS-2412",
"uri": "mongodb://a/?replicaSet=rs",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
],
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": false,
"secondary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000005"
}
}
},
{
"responses": [
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000006"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "Unknown",
"setName": null,
"setVersion": null,
"electionId": null
},
"b:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000006"
}
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000006"
}
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "Unknown",
"setName": null,
"setVersion": null,
"electionId": null
},
"b:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000006"
}
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000006"
}
}
}
]
}

View File

@ -0,0 +1,227 @@
{
"description": "Member list is updated when setVersion and electionId remain the same",
"uri": "mongodb://a/?replicaSet=rs",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
],
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": false,
"secondary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000001"
}
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017",
"c:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
},
"c:27017": {
"type": "Unknown",
"setName": null,
"setVersion": null,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000001"
}
}
},
{
"responses": [
[
"c:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": false,
"secondary": true,
"hosts": [
"a:27017",
"b:27017",
"c:27017"
],
"setName": "rs",
"setVersion": 1,
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
},
"c:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000001"
}
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000001"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000001"
}
}
}
]
}

View File

@ -0,0 +1,167 @@
{
"description": "DSC to ASC reverse migration - ASC primary with higher setVersion is accepted",
"uri": "mongodb://a/?replicaSet=rs",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
],
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": false,
"secondary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 1,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1,
"maxElectionId": {
"$oid": "000000000000000000000005"
}
}
},
{
"responses": [
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1000,
"electionId": {
"$oid": "000000000000000000000006"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "Unknown",
"setName": null,
"setVersion": null,
"electionId": null
},
"b:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1000,
"electionId": {
"$oid": "000000000000000000000006"
}
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1000,
"maxElectionId": {
"$oid": "000000000000000000000006"
}
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 1,
"electionId": {
"$oid": "000000000000000000000005"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "Unknown",
"setName": null,
"setVersion": null,
"electionId": null
},
"b:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 1000,
"electionId": {
"$oid": "000000000000000000000006"
}
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 1000,
"maxElectionId": {
"$oid": "000000000000000000000006"
}
}
}
]
}

View File

@ -0,0 +1,119 @@
{
"description": "ASC to DSC forward migration - DSC uses setVersionASC + 1 to prevent false stale detection",
"uri": "mongodb://a/?replicaSet=rs",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 10,
"electionId": {
"$oid": "000000000000000000000005"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
],
[
"b:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": false,
"secondary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 10,
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 10,
"electionId": {
"$oid": "000000000000000000000005"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 10,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 10,
"maxElectionId": {
"$oid": "000000000000000000000005"
}
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"helloOk": true,
"isWritablePrimary": true,
"hosts": [
"a:27017",
"b:27017"
],
"setName": "rs",
"setVersion": 11,
"electionId": {
"$oid": "000000000000000000000006"
},
"minWireVersion": 0,
"maxWireVersion": 17
}
]
],
"outcome": {
"servers": {
"a:27017": {
"type": "RSPrimary",
"setName": "rs",
"setVersion": 11,
"electionId": {
"$oid": "000000000000000000000006"
}
},
"b:27017": {
"type": "RSSecondary",
"setName": "rs",
"setVersion": 10,
"electionId": null
}
},
"topologyType": "ReplicaSetWithPrimary",
"logicalSessionTimeoutMinutes": null,
"setName": "rs",
"maxSetVersion": 11,
"maxElectionId": {
"$oid": "000000000000000000000006"
}
}
}
]
}

View File

@ -0,0 +1,62 @@
{
"topology_description": {
"type": "ReplicaSetNoPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "Nearest",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,62 @@
{
"topology_description": {
"type": "ReplicaSetNoPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "PrimaryPreferred",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,62 @@
{
"topology_description": {
"type": "ReplicaSetNoPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "Secondary",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,62 @@
{
"topology_description": {
"type": "ReplicaSetNoPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "SecondaryPreferred",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,70 @@
{
"topology_description": {
"type": "ReplicaSetWithPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
},
{
"address": "a:27017",
"avg_rtt_ms": 26,
"type": "RSPrimary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "Nearest",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,70 @@
{
"topology_description": {
"type": "ReplicaSetWithPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
},
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "nyc"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "PrimaryPreferred",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,70 @@
{
"topology_description": {
"type": "ReplicaSetWithPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
},
{
"address": "a:27017",
"avg_rtt_ms": 26,
"type": "RSPrimary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "Secondary",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
]
}

View File

@ -0,0 +1,70 @@
{
"topology_description": {
"type": "ReplicaSetWithPrimary",
"servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
},
{
"address": "c:27017",
"avg_rtt_ms": 100,
"type": "RSSecondary",
"tags": {
"data_center": "tokyo"
}
},
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "tokyo"
}
}
]
},
"operation": "read",
"read_preference": {
"mode": "SecondaryPreferred",
"tag_sets": [
{
"data_center": "nyc"
}
]
},
"deprioritized_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary",
"tags": {
"data_center": "nyc"
}
}
],
"suitable_servers": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "tokyo"
}
}
],
"in_latency_window": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary",
"tags": {
"data_center": "tokyo"
}
}
]
}

View File

@ -0,0 +1,41 @@
{
"topology_description": {
"type": "ReplicaSetWithPrimary",
"servers": [
{
"address": "a:27017",
"avg_rtt_ms": 5,
"type": "RSPrimary"
},
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary"
}
]
},
"operation": "read",
"read_preference": {
"mode": "SecondaryPreferred",
"tag_sets": [
{
"data_center": "nyc"
},
{}
]
},
"suitable_servers": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary"
}
],
"in_latency_window": [
{
"address": "b:27017",
"avg_rtt_ms": 5,
"type": "RSSecondary"
}
]
}