...
1description: "Primary with older topologyVersion"
2
3uri: "mongodb://a/?replicaSet=rs"
4
5phases: [
6
7 # Primary A is discovered
8 {
9 responses: [
10 ["a:27017", {
11 ok: 1,
12 helloOk: true,
13 isWritablePrimary: true,
14 hosts: ["a:27017"],
15 setName: "rs",
16 minWireVersion: 0,
17 maxWireVersion: 9,
18 topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}}
19 }]
20 ],
21
22 outcome: {
23 servers: {
24 "a:27017": {
25 type: "RSPrimary",
26 setName: "rs",
27 topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}}
28 }
29 },
30 topologyType: "ReplicaSetWithPrimary",
31 logicalSessionTimeoutMinutes: null,
32 setName: "rs",
33 }
34 },
35
36 # A responds with an older topologyVersion, we should ignore the response.
37 {
38 responses: [
39 ["a:27017", {
40 ok: 1,
41 helloOk: true,
42 isWritablePrimary: true,
43 hosts: ["a:27017", "b:27017"],
44 setName: "rs",
45 minWireVersion: 0,
46 maxWireVersion: 9,
47 topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "0"}}
48 }]
49 ],
50
51 outcome: {
52 servers: {
53 "a:27017": {
54 type: "RSPrimary",
55 setName: "rs",
56 topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}}
57 }
58 },
59 topologyType: "ReplicaSetWithPrimary",
60 logicalSessionTimeoutMinutes: null,
61 setName: "rs",
62 }
63 }
64]
View as plain text