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

Cache repository default branch commit status to reduce query on commit status table (#29444) #29657

Conversation

lunny
Copy link
Member

@lunny lunny commented Mar 8, 2024

Backport #29444

After repository commit status has been introduced on dashaboard, the most top SQL comes from GetLatestCommitStatusForPairs.

This PR adds a cache for the repository's default branch's latest combined commit status. When a new commit status updated, the cache will be marked as invalid.

image

…it status table (go-gitea#29444)

After repository commit status has been introduced on dashaboard, the
most top SQL comes from `GetLatestCommitStatusForPairs`.

This PR adds a cache for the repository's default branch's latest
combined commit status. When a new commit status updated, the cache will
be marked as invalid.

<img width="998" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/76759de7-3a83-4d54-8571-278f5422aed3">
@lunny lunny added the performance/speed performance issues with slow downs label Mar 8, 2024
@lunny lunny added this to the 1.21.8 milestone Mar 8, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 8, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 8, 2024
@lunny lunny closed this Mar 8, 2024
@lunny lunny deleted the lunny/cache_repo_last_commit_status2 branch March 8, 2024 07:34
@lunny
Copy link
Member Author

lunny commented Mar 8, 2024

Since cache in v1.21 can be disabled, so the code needs to be changed. And I think maybe we could not backport it.

@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label Mar 8, 2024
@GiteaBot GiteaBot removed this from the 1.21.8 milestone Mar 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
@wxiaoguang
Copy link
Contributor

Fortunately, no backport. Regression! Javascript promise error on dashboard #30768

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them performance/speed performance issues with slow downs size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants