...
1description: "New primary with equal electionId"
2
3uri: "mongodb://a/?replicaSet=rs"
4
5phases: [
6
7 # A and B claim to be primaries, with equal electionIds.
8 {
9 responses: [
10 ["a:27017", {
11 ok: 1,
12 helloOk: true,
13 isWritablePrimary: true,
14 hosts: ["a:27017", "b:27017"],
15 setName: "rs",
16 setVersion: 1,
17 electionId: {"$oid": "000000000000000000000001"},
18 minWireVersion: 0,
19 maxWireVersion: 6
20 }],
21 ["b:27017", {
22 ok: 1,
23 helloOk: true,
24 isWritablePrimary: true,
25 hosts: ["a:27017", "b:27017"],
26 setName: "rs",
27 setVersion: 1,
28 electionId: {"$oid": "000000000000000000000001"},
29 minWireVersion: 0,
30 maxWireVersion: 6
31 }]
32 ],
33
34 # No choice but to believe the latter response.
35 outcome: {
36 servers: {
37 "a:27017": {
38 type: "Unknown",
39 setName: ,
40 setVersion: ,
41 electionId:
42 },
43 "b:27017": {
44 type: "RSPrimary",
45 setName: "rs",
46 setVersion: 1,
47 electionId: {"$oid": "000000000000000000000001"}
48 }
49 },
50 topologyType: "ReplicaSetWithPrimary",
51 logicalSessionTimeoutMinutes: null,
52 setName: "rs",
53 maxSetVersion: 1,
54 maxElectionId: {"$oid": "000000000000000000000001"},
55 }
56 }
57]
View as plain text