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

perf: introduce update quota by redis #18871

Merged
merged 1 commit into from Jul 10, 2023
Merged

Conversation

chlins
Copy link
Member

@chlins chlins commented Jun 30, 2023

Introduce the quota update provider, improve the performance of pushing artifacts to same project with high concurrency by implementing optimistic lock in redis. By default the function is disabled, open it by set env 'QUOTA_UPDATE_PROVIDER=Redis' for the core container.

Refer to the wiki for more details.

Fixes: #18440

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #18440

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@chlins chlins added area/performance release-note/enhancement Label to mark PR to be added under release notes as enhancement target/2.9.0 labels Jun 30, 2023
@chlins chlins requested a review from a team as a code owner June 30, 2023 06:14
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #18871 (d7fdfc5) into main (fb52fdb) will decrease coverage by 22.65%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #18871       +/-   ##
===========================================
- Coverage   67.39%   44.74%   -22.65%     
===========================================
  Files         981      236      -745     
  Lines      107194    13178    -94016     
  Branches     2698     2698               
===========================================
- Hits        72246     5897    -66349     
+ Misses      31065     6986    -24079     
+ Partials     3883      295     -3588     
Flag Coverage Δ
unittests 44.74% <ø> (-22.65%) ⬇️

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

see 746 files with indirect coverage changes

Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

Introduce the quota update provider, improve the performance of pushing
artifacts to same project with high concurrency by implementing
optimistic lock in redis. By default the function is disabled, open it
by set env 'QUOTA_UPDATE_PROVIDER=Redis' for the core container.

Fixes: goharbor#18440

Signed-off-by: chlins <chenyuzh@vmware.com>
@chlins chlins merged commit 78799cc into goharbor:main Jul 10, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance release-note/enhancement Label to mark PR to be added under release notes as enhancement target/2.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when push image concurrently, updating the quota will be stuck for a few seconds
6 participants