-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: cache util fixes #4647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: cache util fixes #4647
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary of ChangesHello @hajnalmt, 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 refines the cache utility functions by improving logging and optimizing logic for single-scheduler environments. It resolves misleading log messages that appear when the Highlights
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.
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 correctly addresses the ambiguous logging in single-scheduler scenarios by adding checks for an empty schedulerPodName in the responsibleFor... utility functions. The changes are clear and prevent unnecessary consistent hash lookups. I've added one suggestion to refactor the duplicated logic into a helper function to improve code maintainability.
The checking functions in the cache utils had ambiguous logging entries: I0925 07:48:34.403937 5756 util.go:79] schedulerPodName is responsible to Node k3d-volcano-dev-agent-2 Since in single scheduler scenarios the schedulerPodname is not populated. These entries are intimidating, because: - It's not clear that we are in caching territory so no things to be afraid. - Looks weird that there is an empty string after schedulerPodName. Furthermore, if it's empty the consistent hash circle is not needed to be checked. Signed-off-by: Hajnal Máté <[email protected]>
1ef5ed1 to
cb15d16
Compare
|
/assign @Thor-wl |
|
/cc @JesseStutler |
The checking functions in the cache utils has ambiguous logging entries:
I0925 07:48:34.403937 5756 util.go:79] schedulerPodName is responsible to Node k3d-volcano-dev-agent-2Since in single scheduler scenarios the schedulerPodname is not populated. These entries are intimidating, because:
Furthermore, if it's empty the consistent hash circle is not needed to be checked.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Minor improvement in caching.
Adding this check is preventing the responsibility functions to go on.
Which issue(s) this PR fixes:
Fixes #4646
Special notes for your reviewer:
The reason why it's empty is laying in the multi-scheduler implementation based on consistency hashes:
https://github.com/volcano-sh/volcano/blob/master/docs/design/deploy-multi-volcano-schedulers-without-using-selector.md
Implemented in this PR:
#1795
We get the env vars out in cache.go:
https://github.com/volcano-sh/volcano/blob/master/pkg/scheduler/cache/cache.go#L542
But it is an empty string since it's not specified:
https://github.com/volcano-sh/volcano/blob/master/pkg/scheduler/cache/util.go#L106
This is most of the cases as we don't support this config through the helm chart yet. See:
#4645
Does this PR introduce a user-facing change?