Skip to content

If a repository return no commitstatus, then still cache it but not query it from database #30700

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

Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 25, 2024

The previous repository default branch commit status cache will only store if the commit status has value. So the repository which have no any commit status will always be fetched from database.

This PR will store the empty state of commit status of a repository into cache because the cache will be updated once there is a commit status stored.

@lunny lunny added performance/speed performance issues with slow downs backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 labels Apr 25, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 25, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 25, 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 Apr 25, 2024
@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 Apr 25, 2024
@wolfogre wolfogre added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2024
@wolfogre wolfogre merged commit c685eef into go-gitea:main Apr 25, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Apr 25, 2024
@GiteaBot
Copy link
Collaborator

I was unable to create a backport for 1.21. @lunny, please send one manually. 🍵

go run ./contrib/backport 30700
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Apr 25, 2024
@lunny lunny deleted the lunny/store_nostate_commitstatus_cache branch April 25, 2024 09:19
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 25, 2024
* giteaofficial/main:
  If a repository return no commitstatus, then still cache it but not query it from database (go-gitea#30700)
  [skip ci] Updated translations via Crowdin
  Fix view of readme file in the home code page. (go-gitea#30564)
  Add test for go-gitea#30674 (go-gitea#30679)
  Fix border-radius of header+segment boxes (go-gitea#30667)
@wxiaoguang wxiaoguang modified the milestones: 1.23.0, 1.22.0 Apr 27, 2024
lunny added a commit to lunny/gitea that referenced this pull request Apr 27, 2024
…uery it from database (go-gitea#30700)

The previous repository default branch commit status cache will only
store if the commit status has value. So the repository which have no
any commit status will always be fetched from database.

This PR will store the empty state of commit status of a repository into
cache because the cache will be updated once there is a commit status
stored.
@lunny lunny added backport/done All backports for this PR have been created and removed backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 labels Apr 27, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code performance/speed performance issues with slow downs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants