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

Repo size on web isn't updated after Auto GC #14862

Closed
2 of 6 tasks
bagasme opened this issue Mar 3, 2021 · 3 comments · Fixed by #15177
Closed
2 of 6 tasks

Repo size on web isn't updated after Auto GC #14862

bagasme opened this issue Mar 3, 2021 · 3 comments · Fixed by #15177
Labels
type/enhancement An improvement of existing functionality

Comments

@bagasme
Copy link
Contributor

bagasme commented Mar 3, 2021

  • Gitea version (or commit ref): master (commit b2986ab)
  • Git version: 2.30.1
  • Operating system: Debian 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (not relevant)
  • Log gist: (not relevant)

Description

When auto gc occurs, the actual repo size is shrinked, but the repo size on web interface isn't updated accordingly.

For example, today I pushed recent commits on git.git (Git SCM repo) to my local Gitea instance, then auto gc was invoked.
After auto gc, the repo size was about 132 MiB, but on the web interface the size was still 211 MiB (before gc)

Screenshots

on web interface
on web interface, repo size: 211 MiB
git count-objects -v on the instance
git count-objects -v when accessing the interface, repo size: 132 MiB

@bagasme bagasme changed the title Repo size on web doesn't updated after Auto GC Repo size on web isn't updated after Auto GC Mar 3, 2021
@zeripath
Copy link
Contributor

UpdateSize is only called during PushUpdates - I guess the auto gc happened after PushUpdates was called.

I'm not really sure what we can do - updating size is an expensive function. The only thing I can imagine is a cron task that can be called to update things.

@6543
Copy link
Member

6543 commented Mar 11, 2021

add it to the cron task that gc repos?

@lunny lunny added the type/enhancement An improvement of existing functionality label Mar 12, 2021
@bagasme
Copy link
Contributor Author

bagasme commented Mar 21, 2021

@6543 seems ok

@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants