Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
ffb54096
Unverified
Commit
ffb54096
authored
Jul 23, 2025
by
Yan Ru Pei
Committed by
GitHub
Jul 23, 2025
Browse files
fix: endpoint changes should be prioritized over new requests in kv scheduler (#2071)
Signed-off-by:
Yan Ru Pei
<
yanrpei@gmail.com
>
parent
e0a51940
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
lib/llm/src/kv_router/scheduler.rs
lib/llm/src/kv_router/scheduler.rs
+10
-13
No files found.
lib/llm/src/kv_router/scheduler.rs
View file @
ffb54096
...
...
@@ -142,24 +142,20 @@ impl KvScheduler {
request
=
tokio
::
select!
{
biased
;
new_request
=
request_rx
.recv
()
=>
{
match
new_request
{
Some
(
new_request
)
=>
{
tracing
::
trace!
(
"received request to be scheduled"
);
new_request
},
None
=>
{
tracing
::
trace!
(
"scheduler shutdown"
);
break
'outer
;
}
}
}
_
=
endpoints_rx
.changed
()
=>
{
endpoints
=
endpoints_rx
.borrow_and_update
()
.clone
();
pending_endpoint_update
=
Some
(
endpoints
.worker_ids
());
continue
'outer
;
}
maybe_new_request
=
request_rx
.recv
()
=>
{
let
Some
(
new_request
)
=
maybe_new_request
else
{
tracing
::
warn!
(
"scheduler shutdown"
);
break
'outer
;
};
tracing
::
trace!
(
"received request to be scheduled"
);
new_request
}
};
loop
{
...
...
@@ -181,6 +177,7 @@ impl KvScheduler {
request
.respond
(
response
);
continue
'outer
;
}
// TODO: this is not actually hooked up
Err
(
KvSchedulerError
::
AllWorkersBusy
)
=>
{
tracing
::
trace!
(
"all workers busy; waiting for more capacity"
);
tokio
::
time
::
sleep
(
Duration
::
from_millis
(
5
))
.await
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment