Change the driver to maintain a count of in-progress operations to each server (per client). When selecting a mongos server, the driver now picks 2 suitable servers at random and selects the server with fewer in-progress operations. Previously, the driver selected a mongos server at random. The new behavior is intended to route operations away from unhealthy or slow servers in highly concurrent single client workloads. PYTHON-2460 Only reset Pool.active_sockets to 0 after a fork()
37 lines
640 B
JSON
37 lines
640 B
JSON
{
|
|
"description": "Better of two choices always selected",
|
|
"topology_description": {
|
|
"type": "Sharded",
|
|
"servers": [
|
|
{
|
|
"address": "a:27017",
|
|
"avg_rtt_ms": 35,
|
|
"type": "Mongos"
|
|
},
|
|
{
|
|
"address": "b:27017",
|
|
"avg_rtt_ms": 35,
|
|
"type": "Mongos"
|
|
}
|
|
]
|
|
},
|
|
"mocked_topology_state": [
|
|
{
|
|
"address": "a:27017",
|
|
"operation_count": 0
|
|
},
|
|
{
|
|
"address": "b:27017",
|
|
"operation_count": 5
|
|
}
|
|
],
|
|
"iterations": 100,
|
|
"outcome": {
|
|
"tolerance": 0,
|
|
"expected_frequencies": {
|
|
"a:27017": 1,
|
|
"b:27017": 0
|
|
}
|
|
}
|
|
}
|