Debian Codegraph @

testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.yml

raw symbols SCIP
1 description: ElectionId is considered higher precedence than setVersion
2 uri: "mongodb://a/?replicaSet=rs"
3 phases:
4 - responses:
5 - - "a:27017"
6 - ok: 1
7 helloOk: true
8 isWritablePrimary: true
9 hosts:
10 - "a:27017"
11 - "b:27017"
12 setName: rs
13 setVersion: 1
14 electionId:
15 $oid: "000000000000000000000001"
16 minWireVersion: 0
17 maxWireVersion: 17
18 - - "b:27017"
19 - ok: 1
20 helloOk: true
21 isWritablePrimary: true
22 hosts:
23 - "a:27017"
24 - "b:27017"
25 setName: rs
26 setVersion: 2 # Even though "B" reports the newer setVersion, "A" will report the newer electionId which should allow it to remain the primary
27 electionId:
28 $oid: "000000000000000000000001"
29 minWireVersion: 0
30 maxWireVersion: 17
31 - - "a:27017"
32 - ok: 1
33 helloOk: true
34 isWritablePrimary: true
35 hosts:
36 - "a:27017"
37 - "b:27017"
38 setName: rs
39 setVersion: 1
40 electionId:
41 $oid: "000000000000000000000002"
42 minWireVersion: 0
43 maxWireVersion: 17
44 outcome:
45 servers:
46 "a:27017":
47 type: RSPrimary
48 setName: rs
49 setVersion: 1
50 electionId:
51 $oid: "000000000000000000000002"
52 "b:27017":
53 type: Unknown
54 setName: null
55 setVersion: null
56 electionId: null
57 topologyType: ReplicaSetWithPrimary
58 logicalSessionTimeoutMinutes: null
59 setName: rs
60 maxSetVersion: 1
61 maxElectionId:
62 $oid: "000000000000000000000002"