This commit is contained in:
Dobromir Popov
2026-07-08 20:00:58 +03:00

View File

@@ -5479,7 +5479,7 @@ class _TrackerHandler(http.server.BaseHTTPRequestHandler):
# Prefer a distributed multi-hop route when available. Greedy # Prefer a distributed multi-hop route when available. Greedy
# _select_route alone would pick a single full-shard node and omit # _select_route alone would pick a single full-shard node and omit
# partial head shards that share the same port on another host. # 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 = "" error = ""
else: else:
route, error = _select_route( route, error = _select_route(