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

[YUNIKORN-2630] Release context lock early for config changes #842

Closed
wants to merge 2 commits into from

Conversation

wilfred-s
Copy link
Contributor

What is this PR for?

Release the lock of the context in the shim when processing is done. When the config changes are sent to the core the k8shim should not be locked. The context changes have been finalised at that point.

The core handles its own locking and serialises config changes that come in from the k8shim.

What type of PR is it?

  • - Improvement

What is the Jira issue?

How should this be tested?

Current unit and e2e tests cover the changed paths

Release the lock of the context in the shim when processing is done.
When the config changes are sent to the core the k8shim should not be
locked. The context changes have been finalised at that point.

The core handles its own locking and serialises config changes that come
in from the k8shim.
Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 67.26%. Comparing base (5f80f49) to head (048162c).
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/cache/context.go 0.00% 14 Missing ⚠️
pkg/conf/schedulerconf.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #842      +/-   ##
==========================================
- Coverage   67.33%   67.26%   -0.07%     
==========================================
  Files          70       70              
  Lines        7598     7604       +6     
==========================================
- Hits         5116     5115       -1     
- Misses       2271     2276       +5     
- Partials      211      213       +2     

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

Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@wilfred-s nice patch.

pkg/cache/context.go Outdated Show resolved Hide resolved
Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

+1 LGTM

@chia7712 chia7712 closed this in 6aa6afe May 21, 2024
chia7712 pushed a commit that referenced this pull request May 21, 2024
Release the lock of the context in the shim when processing is done.
When the config changes are sent to the core the k8shim should not be
locked. The context changes have been finalised at that point.

The core handles its own locking and serialises config changes that come
in from the k8shim.
review: remove call through api to get config.

Closes: #842

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
@wilfred-s wilfred-s deleted the YUNIKORN-2630 branch May 22, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants