This commit is contained in:
Dobromir Popov
2026-07-08 18:54:38 +02:00
parent e44abc910d
commit 1ecc599f7f

View File

@@ -5475,7 +5475,7 @@ class _TrackerHandler(http.server.BaseHTTPRequestHandler):
# Prefer a distributed multi-hop route when available. Greedy
# _select_route alone would pick a single full-shard node and omit
# partial head shards that share the same port on another host.
route = max(candidates, key=lambda cand: len(cand.nodes)).nodes
route = max(candidates, key=lambda cand: (len(cand.nodes), cand.prior_tps)).nodes
error = ""
else:
route, error = _select_route(