Skip to content

bugfix: rollback shared prefix blocks on allocate failure.#1146

Merged
RobbieLeung merged 2 commits intojd-opensource:mainfrom
RobbieLeung:bugfix/scheduler
Apr 5, 2026
Merged

bugfix: rollback shared prefix blocks on allocate failure.#1146
RobbieLeung merged 2 commits intojd-opensource:mainfrom
RobbieLeung:bugfix/scheduler

Conversation

@RobbieLeung
Copy link
Copy Markdown
Collaborator

No description provided.

XuZhang99
XuZhang99 previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces rollback logic in BlockManagerPool::allocate to handle allocation failures by releasing shared prefix blocks and embedding IDs. It also adds a unit test to verify this functionality. Review feedback highlights a resource leak caused by the incorrect ordering of reset operations and a memory leak in the test suite resulting from the use of release() instead of reset().

Comment thread xllm/core/framework/block/block_manager_pool.cpp Outdated
Comment thread xllm/core/scheduler/continuous_scheduler_test.cpp
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@yq33victor yq33victor left a comment

Choose a reason for hiding this comment

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

LGTM

@RobbieLeung RobbieLeung merged commit 80167b8 into jd-opensource:main Apr 5, 2026
23 checks passed
@RobbieLeung RobbieLeung deleted the bugfix/scheduler branch April 5, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants