Demote the P/D source-fingerprint mismatch to a warning

The fingerprint hashes the whole source tree, so ANY code difference
between the prefill and decode trees tripped it — and it raised inside
try_ensure_parallel_info on the DECODE scheduler's event loop, crashing
the decode cluster.  In practice that means a prefill-only restart with
a one-line fix (today: the inflight liveness fix) kills decode.

The checks that actually guard the KV transfer contract (page size,
kv cache dtype) remain hard errors; the fingerprint is now a warning
that still surfaces both hashes and source roots.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 05:15:11 +00:00
parent 58f2350738
commit a75164ef48

View File

@@ -331,14 +331,21 @@ class CommonKVManager(BaseKVManager):
and local_source_fingerprint is not None
and info.runtime_source_fingerprint != local_source_fingerprint
):
raise RuntimeError(
"Runtime source fingerprint mismatch between prefill and decode. "
"This can corrupt disaggregated KV transfer contracts. "
f"prefill_fingerprint={info.runtime_source_fingerprint}, "
f"decode_fingerprint={local_source_fingerprint}, "
f"prefill_source_root={info.runtime_source_root}, "
f"decode_source_root={get_runtime_source_root()}. "
"Restart both prefill and decode from the same source tree."
# Advisory only: the fingerprint hashes the whole source tree, so
# ANY code difference trips it — including changes that do not
# touch the KV transfer contract (a prefill-only restart with a
# one-line fix used to CRASH the decode scheduler here). The
# contract-relevant mismatches (page size, kv dtype) are checked
# above and still fail hard.
logger.warning(
"Runtime source fingerprint differs between prefill and decode "
"(prefill_fingerprint=%s, decode_fingerprint=%s, "
"prefill_source_root=%s, decode_source_root=%s). Make sure the "
"KV transfer layout contract is unchanged between the trees.",
info.runtime_source_fingerprint,
local_source_fingerprint,
info.runtime_source_root,
get_runtime_source_root(),
)
self._resolve_rank_mapping(info)