...

Text file src/go.mongodb.org/mongo-driver/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml

Documentation: go.mongodb.org/mongo-driver/testdata/max-staleness/ReplicaSetNoPrimary

     1# Fallback to secondary if no primary.
     2---
     3heartbeatFrequencyMS: 25000  # 25 seconds.
     4topology_description:
     5  type: ReplicaSetNoPrimary
     6  servers:
     7  - &1
     8    address: a:27017
     9    type: RSSecondary
    10    avg_rtt_ms: 5
    11    lastUpdateTime: 0
    12    maxWireVersion: 6
    13    lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
    14  - &2
    15    address: b:27017
    16    type: RSSecondary
    17    avg_rtt_ms: 5
    18    lastUpdateTime: 0
    19    maxWireVersion: 6
    20    lastWrite: {lastWriteDate: {$numberLong: "1"}}  # Very stale.
    21read_preference:
    22  mode: PrimaryPreferred
    23  maxStalenessSeconds: 90
    24suitable_servers:
    25- *1
    26in_latency_window:
    27- *1

View as plain text