...

Text file src/go.mongodb.org/mongo-driver/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.yml

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

     1# If users configure a longer ``heartbeatFrequencyMS`` than the default,
     2# ``maxStalenessSeconds`` might have a larger minimum.
     3---
     4heartbeatFrequencyMS: 120000  # 120 seconds.
     5topology_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"}}
    22read_preference:
    23  mode: Nearest
    24  maxStalenessSeconds: 130  # OK, must be 120 + 10 = 130 seconds.
    25suitable_servers:
    26- *1
    27- *2
    28in_latency_window:
    29- *1

View as plain text