Skip to content
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

feat(qrm-plugins): synchronous GetAdvice API between qrm-plugins and sys-advisor #747

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

gary-lgy
Copy link
Member

@gary-lgy gary-lgy commented Dec 18, 2024

What type of PR is this?

Replace ListAndWatch api from sysadvisor with synchronous GetAdvice rpc.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@gary-lgy gary-lgy changed the title Synchronous GetAdvice API between qrm-plugins and sys-advisor feat(qrm-plugins): synchronous GetAdvice API between qrm-plugins and sys-advisor Dec 19, 2024
@gary-lgy gary-lgy force-pushed the qrm-sync branch 2 times, most recently from 6a46b8a to b1bd308 Compare December 19, 2024 07:26
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 67.41935% with 202 lines in your changes missing coverage. Please review.

Project coverage is 60.54%. Comparing base (161358c) to head (8274d33).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...nt/sysadvisor/plugin/qosaware/server/cpu_server.go 62.20% 47 Missing and 18 partials ⚠️
...ins/memory/dynamicpolicy/policy_advisor_handler.go 58.69% 33 Missing and 5 partials ⚠️
...sysadvisor/plugin/qosaware/server/memory_server.go 42.18% 30 Missing and 7 partials ⚠️
...lugins/cpu/dynamicpolicy/policy_advisor_handler.go 75.43% 23 Missing and 5 partials ⚠️
...g/agent/qrm-plugins/memory/dynamicpolicy/policy.go 64.10% 12 Missing and 2 partials ⚠️
pkg/agent/qrm-plugins/commonstate/pool.go 76.66% 4 Missing and 3 partials ⚠️
pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy.go 93.87% 2 Missing and 1 partial ⚠️
cmd/katalyst-agent/app/options/qrm/cpu_plugin.go 50.00% 2 Missing ⚠️
...md/katalyst-agent/app/options/qrm/memory_plugin.go 80.00% 2 Missing ⚠️
...g/agent/qrm-plugins/advisorsvc/advisor_svc_stub.go 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #747      +/-   ##
==========================================
+ Coverage   56.78%   60.54%   +3.75%     
==========================================
  Files         601      598       -3     
  Lines       69829    62933    -6896     
==========================================
- Hits        39655    38100    -1555     
+ Misses      25927    20985    -4942     
+ Partials     4247     3848     -399     
Flag Coverage Δ
unittest 60.54% <67.41%> (+3.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gary-lgy gary-lgy force-pushed the qrm-sync branch 5 times, most recently from 505ec78 to 473cb31 Compare December 23, 2024 06:13
@@ -26,6 +26,9 @@ coverage:

ignore:
- "**/*_generated.*"
- "pkg/agent/qrm-plugins/cpu/dynamicpolicy/cpuadvisor/cpu.pb.go"
- "pkg/agent/qrm-plugins/advisorsvc/advisor_svc.pb.go"
Copy link
Collaborator

Choose a reason for hiding this comment

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

it can also use generic match such as "*.pb.go"

}
}

if err := ms.metaCache.RangeAndDeleteContainer(func(container *types.ContainerInfo) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

whether it will dead lock for it acquiring metaCache lock multiple times?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, line 141 acquires metaCache.Mutex, while line 153 acquires metaCache.podMutex.

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.

2 participants