Skip to content

fix: flowcontrol - finalize requests during shutdown#2156

Merged
LukeAVanDrie merged 2 commits into
llm-d:mainfrom
nicole-lihui:fix/flowcontrol-finalize-requests-2099
Jul 23, 2026
Merged

fix: flowcontrol - finalize requests during shutdown#2156
LukeAVanDrie merged 2 commits into
llm-d:mainfrom
nicole-lihui:fix/flowcontrol-finalize-requests-2099

Conversation

@nicole-lihui

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

Finalizes requests that race with Flow Controller shutdown instead of leaving them stranded until request TTL or client cancellation.
Shutdown outcomes preserve the distinction between rejected requests and requests evicted from the queue.

Which issue(s) this PR fixes:

Fixes #2099

Release note (write NONE if no user-facing change):

Requests submitted during Flow Controller shutdown are finalized promptly with a shutdown response instead of waiting for request TTL.

fixes llm-d#2099

Signed-off-by: nicole-lihui <nicole.li@daocloud.io>
@nicole-lihui
nicole-lihui requested review from a team, LukeAVanDrie and shmuelk as code owners July 23, 2026 10:29
@nicole-lihui
nicole-lihui requested review from liu-cong and vMaroon July 23, 2026 10:29
@github-actions github-actions Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. labels Jul 23, 2026

@LukeAVanDrie LukeAVanDrie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @nicole-lihui!

case <-reqCtx.Done():
// Asynchronous Finalization (Controller-initiated):
// The request Context expired (Cancellation/TTL) while the item was being processed.
if fc.parentCtx.Err() != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this deterministic; good catch!

@LukeAVanDrie
LukeAVanDrie merged commit 493cec1 into llm-d:main Jul 23, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. kind/cleanup kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flow Control] Request submitted during shutdown can strand until TTL with no finalization

2 participants