...

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

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

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

View as plain text