Debian Codegraph @

testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.yml

raw
1 # If users configure a longer ``heartbeatFrequencyMS`` than the default,
2 # ``maxStalenessSeconds`` might have a larger minimum.
3 ---
4 heartbeatFrequencyMS: 120000 # 120 seconds.
5 topology_description:
6 type: ReplicaSetWithPrimary
7 servers:
8 - &1
9 address: a:27017
10 type: RSPrimary
11 avg_rtt_ms: 5
12 lastUpdateTime: 0
13 maxWireVersion: 6
14 lastWrite: {lastWriteDate: {$numberLong: "1"}}
15 - &2
16 address: b:27017
17 type: RSSecondary
18 avg_rtt_ms: 50 # Too far.
19 lastUpdateTime: 0
20 maxWireVersion: 6
21 lastWrite: {lastWriteDate: {$numberLong: "1"}}
22 read_preference:
23 mode: Nearest
24 maxStalenessSeconds: 130 # OK, must be 120 + 10 = 130 seconds.
25 suitable_servers:
26 - *1
27 - *2
28 in_latency_window:
29 - *1