Skip to content

Commit 636cac1

Browse files
committed
CDRIVER-3884 Ensure that SDAM ignores the writeErrors field
1 parent 23fa39d commit 636cac1

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"description": "writeErrors field is ignored",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 9,
19+
"topologyVersion": {
20+
"processId": {
21+
"$oid": "000000000000000000000001"
22+
},
23+
"counter": {
24+
"$numberLong": "1"
25+
}
26+
}
27+
}
28+
]
29+
],
30+
"outcome": {
31+
"servers": {
32+
"a:27017": {
33+
"type": "RSPrimary",
34+
"setName": "rs",
35+
"topologyVersion": {
36+
"processId": {
37+
"$oid": "000000000000000000000001"
38+
},
39+
"counter": {
40+
"$numberLong": "1"
41+
}
42+
},
43+
"pool": {
44+
"generation": 0
45+
}
46+
}
47+
},
48+
"topologyType": "ReplicaSetWithPrimary",
49+
"logicalSessionTimeoutMinutes": null,
50+
"setName": "rs"
51+
}
52+
},
53+
{
54+
"description": "Ignore command error with writeErrors field",
55+
"applicationErrors": [
56+
{
57+
"address": "a:27017",
58+
"when": "afterHandshakeCompletes",
59+
"maxWireVersion": 9,
60+
"type": "command",
61+
"response": {
62+
"ok": 1,
63+
"writeErrors": [
64+
{
65+
"errmsg": "NotMasterNoSlaveOk",
66+
"code": 13435
67+
}
68+
]
69+
}
70+
}
71+
],
72+
"outcome": {
73+
"servers": {
74+
"a:27017": {
75+
"type": "RSPrimary",
76+
"setName": "rs",
77+
"topologyVersion": {
78+
"processId": {
79+
"$oid": "000000000000000000000001"
80+
},
81+
"counter": {
82+
"$numberLong": "1"
83+
}
84+
},
85+
"pool": {
86+
"generation": 0
87+
}
88+
}
89+
},
90+
"topologyType": "ReplicaSetWithPrimary",
91+
"logicalSessionTimeoutMinutes": null,
92+
"setName": "rs"
93+
}
94+
}
95+
]
96+
}

0 commit comments

Comments
 (0)