# During server selection, clients (drivers or mongos) MUST raise an error if
# maxStalenessSeconds is defined and not -1 and any server's ``maxWireVersion``
# is less than 5 (`SERVER-23893`_).
---
topology_description:
type: Sharded
servers:
-
address: a:27017
type: Mongos
avg_rtt_ms: 5
lastUpdateTime: 0
maxWireVersion: 5
lastWrite:
-
address: b:27017
type: Mongos
avg_rtt_ms: 5
lastUpdateTime: 0
maxWireVersion: 4 # Incompatible.
lastWrite:
read_preference:
mode: Nearest
maxStalenessSeconds: 120
error: true