Revert "[bugfix] Add close method for static discovery"#816
Revert "[bugfix] Add close method for static discovery"#816max-wittig wants to merge 2 commits intovllm-project:mainfrom
Conversation
Summary of ChangesHello @max-wittig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request reverts a previous change that introduced a Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request reverts a previous change that added a close method for static service discovery. While this might be necessary to fix an issue with the graceful shutdown, the revert re-introduces a critical bug in the health check logic by using a blocking time.sleep call within an async function. My review provides a fix for this issue.
src/vllm_router/service_discovery.py
Outdated
| except asyncio.CancelledError: | ||
| logger.debug("Health check task cancelled") | ||
| break | ||
| time.sleep(60) |
There was a problem hiding this comment.
check_model_health is an async function. Using the blocking time.sleep(60) will block the event loop running in the health check thread. You should use the non-blocking await asyncio.sleep(60) instead.
Additionally, get_unhealthy_endpoint_hashes() is also a blocking call because it uses requests and should ideally be run in an executor to avoid blocking the event loop. For example: await self.loop.run_in_executor(None, self.get_unhealthy_endpoint_hashes).
| time.sleep(60) | |
| await asyncio.sleep(60) |
This reverts commit 5aa144d. Signed-off-by: Max Wittig <max.wittig@siemens.com>
e3fc993 to
9a8347e
Compare
Signed-off-by: Max Wittig <max.wittig@siemens.com>
fa5a81a to
ce9eeb3
Compare
Reverts #692
Closes #815