# Fallback to primary if no secondary is fresh enough.
---
topology_description:
  type: ReplicaSetWithPrimary
  servers:
  - &1
    address: a:27017
    type: RSPrimary
    avg_rtt_ms: 5
    lastUpdateTime: 0
    maxWireVersion: 6
    lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
  - &2
    address: b:27017
    type: RSSecondary
    avg_rtt_ms: 5
    lastUpdateTime: 0
    maxWireVersion: 6
    lastWrite: {lastWriteDate: {$numberLong: "1"}}  # Very stale.
read_preference:
  mode: SecondaryPreferred
  maxStalenessSeconds: 120
suitable_servers:
- *1
in_latency_window:
- *1
