Skip to content

Conversation

baxingpiaochong
Copy link
Contributor

@baxingpiaochong baxingpiaochong commented Oct 9, 2025

What this PR does / why we need it?

When using multi connector, the multi connector does not define get_finished_count, which will cause the kv cache to be released

Does this PR introduce any user-facing change?

How was this patch tested?

Copy link

github-actions bot commented Oct 9, 2025

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
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 aims to fix a bug in the multi-connector logic. It adjusts how the finished count is determined and adds logic to handle requests that don't require data transfer. While the intent seems correct, there's a critical issue in the implementation regarding duplicated and potentially incorrect method logic that needs to be addressed.

Comment on lines +75 to 82
def add_not_transfer_request(self, request_id: str):
with self.done_task_lock:
self.finished_requests.add(request_id)

def update_done_task_count(self, request_id: str):
with self.done_task_lock:
self.finished_requests.add(request_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The newly added method add_not_transfer_request is identical to the update_done_task_count method as shown in the diff at lines 79-81. This code duplication is problematic.

  • If they are meant to be identical, please remove one to avoid confusion and maintenance overhead.
  • If update_done_task_count should have more complex logic (as is often the case for such functions and as suggested by the full file context), then this change might be introducing a critical bug by simplifying it or the diff is misleading.

Please resolve this ambiguity. The current state is confusing and potentially incorrect.

@baxingpiaochong baxingpiaochong changed the title [BugFix]fix_mulit_connector_bug [Bugfix]fix_mulit_connector_bug Oct 10, 2025
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Signed-off-by: baxingpiaochong <771405853@qq.com>
Signed-off-by: baxingpiaochong <771405853@qq.com>
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.

1 participant