Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use per package global lock for container uploads instead of memory lock #31860

Merged
merged 11 commits into from
Oct 11, 2024

Conversation

lunny
Copy link
Member

@lunny lunny commented Aug 18, 2024

This PR uses a per-package lock instead of a global lock for container uploads. So that different packages can be uploaded simultaneously.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 18, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 18, 2024
@lunny lunny added type/enhancement An improvement of existing functionality and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 18, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Aug 18, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 18, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 18, 2024
@lunny lunny changed the title Use per package lock Use per package lock for container uploads Aug 19, 2024
@wolfogre
Copy link
Member

Wait for #31908?

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 26, 2024
@lunny
Copy link
Member Author

lunny commented Aug 26, 2024

Depends on #31813

@lunny lunny added this to the 1.23.0 milestone Sep 6, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 8, 2024
techknowlogick pushed a commit that referenced this pull request Sep 12, 2024
This PR should be replaced by #31860 in v1.23. The aim of creating this
PR is to fix it in 1.22 because globallock hasn't been introduced.

Fix #27640
Fix #29563
Fix #31215
@lunny lunny marked this pull request as draft September 24, 2024 07:10
@lunny
Copy link
Member Author

lunny commented Sep 24, 2024

The lock key should contain owner id.

@lunny lunny marked this pull request as ready for review September 24, 2024 22:35
@lunny lunny changed the title Use per package lock for container uploads Use per package global lock for container uploads instead of memory lock Sep 26, 2024
@yp05327
Copy link
Contributor

yp05327 commented Oct 10, 2024

Do we need to add lock in mountBlob?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 11, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 11, 2024
@lunny lunny enabled auto-merge (squash) October 11, 2024 07:08
@lunny lunny merged commit aebb741 into go-gitea:main Oct 11, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 11, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 16, 2024
* giteaofficial/main:
  Make `owner/repo/pulls` handlers use "PR reader" permission (go-gitea#32254)
  make `show stats` work when only one file changed (go-gitea#32244)
  Update scheduled tasks even if changes are pushed by "ActionsUser" (go-gitea#32246)
  Support migrating GitHub/GitLab PR draft status (go-gitea#32242)
  Only rename a user when they should receive a different name (go-gitea#32247)
  Fix dropdown content overflow (go-gitea#31610)
  Make git push options accept short name (go-gitea#32245)
  Allow code search by filename (go-gitea#32210)
  Allow maintainers to view and edit files of private repos when "Allow maintainers to edit" is enabled (go-gitea#32215)
  Use per package global lock for container uploads instead of memory lock (go-gitea#31860)
@lunny lunny deleted the lunny/lock_per_package branch November 7, 2024 06:47
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 9, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/S Denotes a PR that changes 10-29 lines, ignoring generated files. topic/packages type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants