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

koord-scheduler: fix errors caused by incorrect lock in ElasticQuota #810

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

xulinfei1996
Copy link
Contributor

Signed-off-by: xulinfei.xlf [email protected]

Ⅰ. Describe what this PR does

When deleting QuotaGroup, the pod in the QuotaGroup will be moved to defaultQuota, while the background loop will move the defaultQuota to another quotaGroup. The two processes only have readLock constraints, it will result in some errors. So this PR will change the readLock to writeLock to fix the problem.
As the migrate operation is low-frequency, the writeLock will not influence the performance.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

Signed-off-by: xulinfei.xlf <[email protected]>
@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Base: 67.93% // Head: 67.93% // No change to project coverage 👍

Coverage data is based on head (80c9b7c) compared to base (bfc4c9a).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #810   +/-   ##
=======================================
  Coverage   67.93%   67.93%           
=======================================
  Files         216      216           
  Lines       24372    24372           
=======================================
  Hits        16556    16556           
  Misses       6668     6668           
  Partials     1148     1148           
Flag Coverage Δ
unittests 67.93% <0.00%> (ø)

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

Impacted Files Coverage Δ
...r/plugins/elasticquota/core/group_quota_manager.go 73.26% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra changed the title fix MigratePod koord-scheduler: fix errors caused by incorrect lock in ElasticQuota Nov 15, 2022
Copy link
Member

@eahydra eahydra left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm

@eahydra
Copy link
Member

eahydra commented Nov 17, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit 3928264 into koordinator-sh:main Nov 17, 2022
@FillZpp
Copy link
Member

FillZpp commented Dec 13, 2022

/milestone v1.1

@koordinator-bot koordinator-bot bot added this to the v1.1 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants