pre-warm: log the busy-skip at debug level for diagnostics
Suggested by the local model's code review: schedule_prewarm returned silently when the engine was busy. Now logs (debug) both skip points (busy at turn end / real turn started while loading), so missed warms are diagnosable via RUST_LOG=debug. No behavior change.
This commit is contained in:
1 parent
a52bec97d4
commit
db2dee2d2c
1 file changed
+2
@@ -811,6 +811,7 @@ fn schedule_prewarm(
|
||||
) {
|
||||
tokio::spawn(async move {
|
||||
if !service.is_idle() {
|
||||
tracing::debug!(session = %sid, "pre-warm skipped: engine busy at turn end");
|
||||
return;
|
||||
}
|
||||
// Re-load the current state fresh (the turn just appended messages): the
|
||||
@@ -876,6 +877,7 @@ fn schedule_prewarm(
|
||||
// loaded. If so, skip — it caches its own prefix, so warming a stale one is
|
||||
// pointless. A tiny race remains but is benign (best-effort optimization).
|
||||
if !service.is_idle() {
|
||||
tracing::debug!(session = %sid, "pre-warm skipped: a real turn started while loading");
|
||||
return;
|
||||
}
|
||||
match service.prewarm(&req).await {
|
||||
|
||||
Reference in new issue
Block a user