Debian Codegraph @

testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml

raw
1 # A driver MUST raise an error
2 # if the TopologyType is ReplicaSetWithPrimary or ReplicaSetNoPrimary
3 # and ``maxStalenessSeconds`` is less than 90.
4 ---
5 heartbeatFrequencyMS: 500
6 topology_description:
7 type: ReplicaSetWithPrimary
8 servers:
9 - &1
10 address: a:27017
11 type: RSPrimary
12 avg_rtt_ms: 5
13 lastUpdateTime: 0
14 maxWireVersion: 6
15 lastWrite: {lastWriteDate: {$numberLong: "1"}}
16 - &2
17 address: b:27017
18 type: RSSecondary
19 avg_rtt_ms: 5
20 lastUpdateTime: 0
21 maxWireVersion: 6
22 lastWrite: {lastWriteDate: {$numberLong: "1"}}
23 read_preference:
24 mode: Nearest
25 maxStalenessSeconds: 89 # Too small.
26 error: true