blob: 4c6a49d0cbf801512eb9c720b48bc802ec545f07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Filter out the stale secondary.
---
topology_description:
type: ReplicaSetNoPrimary
servers:
- &1
address: a:27017
type: RSSecondary
avg_rtt_ms: 5
lastUpdateTime: 0
maxWireVersion: 5
lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
- &2
address: b:27017
type: RSSecondary
avg_rtt_ms: 5
lastUpdateTime: 0
maxWireVersion: 5
lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
read_preference:
mode: SecondaryPreferred
maxStalenessSeconds: 120
suitable_servers:
- *1
in_latency_window:
- *1
|