1{
2 "description": "Stale generation NotPrimaryNoSecondaryOk error",
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 "helloOk": true,
13 "isWritablePrimary": true,
14 "hosts": [
15 "a:27017"
16 ],
17 "setName": "rs",
18 "minWireVersion": 0,
19 "maxWireVersion": 9,
20 "topologyVersion": {
21 "processId": {
22 "$oid": "000000000000000000000001"
23 },
24 "counter": {
25 "$numberLong": "1"
26 }
27 }
28 }
29 ]
30 ],
31 "outcome": {
32 "servers": {
33 "a:27017": {
34 "type": "RSPrimary",
35 "setName": "rs",
36 "topologyVersion": {
37 "processId": {
38 "$oid": "000000000000000000000001"
39 },
40 "counter": {
41 "$numberLong": "1"
42 }
43 },
44 "pool": {
45 "generation": 0
46 }
47 }
48 },
49 "topologyType": "ReplicaSetWithPrimary",
50 "logicalSessionTimeoutMinutes": null,
51 "setName": "rs"
52 }
53 },
54 {
55 "description": "Non-stale application network error",
56 "applicationErrors": [
57 {
58 "address": "a:27017",
59 "when": "afterHandshakeCompletes",
60 "maxWireVersion": 9,
61 "type": "network"
62 }
63 ],
64 "outcome": {
65 "servers": {
66 "a:27017": {
67 "type": "Unknown",
68 "topologyVersion": null,
69 "pool": {
70 "generation": 1
71 }
72 }
73 },
74 "topologyType": "ReplicaSetNoPrimary",
75 "logicalSessionTimeoutMinutes": null,
76 "setName": "rs"
77 }
78 },
79 {
80 "description": "Primary A is rediscovered",
81 "responses": [
82 [
83 "a:27017",
84 {
85 "ok": 1,
86 "helloOk": true,
87 "isWritablePrimary": true,
88 "hosts": [
89 "a:27017"
90 ],
91 "setName": "rs",
92 "minWireVersion": 0,
93 "maxWireVersion": 9,
94 "topologyVersion": {
95 "processId": {
96 "$oid": "000000000000000000000001"
97 },
98 "counter": {
99 "$numberLong": "1"
100 }
101 }
102 }
103 ]
104 ],
105 "outcome": {
106 "servers": {
107 "a:27017": {
108 "type": "RSPrimary",
109 "setName": "rs",
110 "topologyVersion": {
111 "processId": {
112 "$oid": "000000000000000000000001"
113 },
114 "counter": {
115 "$numberLong": "1"
116 }
117 },
118 "pool": {
119 "generation": 1
120 }
121 }
122 },
123 "topologyType": "ReplicaSetWithPrimary",
124 "logicalSessionTimeoutMinutes": null,
125 "setName": "rs"
126 }
127 },
128 {
129 "description": "Ignore stale NotPrimaryNoSecondaryOk error (stale generation)",
130 "applicationErrors": [
131 {
132 "address": "a:27017",
133 "generation": 0,
134 "when": "afterHandshakeCompletes",
135 "maxWireVersion": 9,
136 "type": "command",
137 "response": {
138 "ok": 0,
139 "errmsg": "NotPrimaryNoSecondaryOk",
140 "code": 13435,
141 "topologyVersion": {
142 "processId": {
143 "$oid": "000000000000000000000001"
144 },
145 "counter": {
146 "$numberLong": "2"
147 }
148 }
149 }
150 }
151 ],
152 "outcome": {
153 "servers": {
154 "a:27017": {
155 "type": "RSPrimary",
156 "setName": "rs",
157 "topologyVersion": {
158 "processId": {
159 "$oid": "000000000000000000000001"
160 },
161 "counter": {
162 "$numberLong": "1"
163 }
164 },
165 "pool": {
166 "generation": 1
167 }
168 }
169 },
170 "topologyType": "ReplicaSetWithPrimary",
171 "logicalSessionTimeoutMinutes": null,
172 "setName": "rs"
173 }
174 }
175 ]
176}
View as plain text