gerrit flush --call generate a very big cache file.

42 views
Skip to first unread message

Yingchun Li

unread,
Mar 4, 2026, 6:39:56 AM (13 days ago) Mar 4
to Repo and Gerrit Discussion
Hi
    When did the command "ssh -p 29418 localhost gerrit flush --all", it hung
and did not return, when checked the cache dir, there are a very huge cache file.
   ll data/cache/ -alh -S
total 73G
-rw-rw-r-- 1 gerrit gerrit  73G Mar  4 17:39 git_file_diff-v2.mv.db
-rw-rw-r-- 1 gerrit gerrit  60M Mar  4 17:40 modified_files-v2.mv.db
-rw-rw-r-- 1 gerrit gerrit  15M Mar  4 17:40 change_notes-v2.mv.db

the git_file_diff-v2.mv.db is 73G. is this normal?
gerrit version is 3.12.4.
Br,
Yingchun

Luca Milanesio

unread,
Mar 4, 2026, 6:48:07 AM (13 days ago) Mar 4
to Repo and Gerrit Discussion, Luca Milanesio, Yingchun Li


> On 4 Mar 2026, at 11:39, Yingchun Li <sword.l...@gmail.com> wrote:
>
> Hi
> When did the command "ssh -p 29418 localhost gerrit flush --all"

I hope you didn’t do that in production … otherwise I’m surprised you did not hear the screaming all around the company.
Flushing all the caches on a heavily loaded Gerrit would most likely cause an outage.

> , it hung
> and did not return, when checked the cache dir, there are a very huge cache file.
> ll data/cache/ -alh -S
> total 73G
> -rw-rw-r-- 1 gerrit gerrit 73G Mar 4 17:39 git_file_diff-v2.mv.db
> -rw-rw-r-- 1 gerrit gerrit 60M Mar 4 17:40 modified_files-v2.mv.db
> -rw-rw-r-- 1 gerrit gerrit 15M Mar 4 17:40 change_notes-v2.mv.db
>
> the git_file_diff-v2.mv.db is 73G. is this normal?

I believe you have lots of old and stale data in your cache.
The repo is possibly with lots of changes, therefore lots of old diffs.

HTH

Luca.

> gerrit version is 3.12.4.
> Br,
> Yingchun
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/79396e71-320c-49db-8d51-0e5b7f105c84n%40googlegroups.com.

Yingchun Li

unread,
Mar 4, 2026, 7:04:23 AM (13 days ago) Mar 4
to Repo and Gerrit Discussion
Thanks Luca.

On Wednesday, March 4, 2026 at 7:48:07 PM UTC+8 Luca Milanesio wrote:


> On 4 Mar 2026, at 11:39, Yingchun Li <sword.l...@gmail.com> wrote:
>
> Hi
> When did the command "ssh -p 29418 localhost gerrit flush --all"

I hope you didn’t do that in production … otherwise I’m surprised you did not hear the screaming all around the company.
Flushing all the caches on a heavily loaded Gerrit would most likely cause an outage.

En, I did on a test machine, but there are a lot of stale repos. 
> , it hung
> and did not return, when checked the cache dir, there are a very huge cache file.
> ll data/cache/ -alh -S
> total 73G
> -rw-rw-r-- 1 gerrit gerrit 73G Mar 4 17:39 git_file_diff-v2.mv.db
> -rw-rw-r-- 1 gerrit gerrit 60M Mar 4 17:40 modified_files-v2.mv.db
> -rw-rw-r-- 1 gerrit gerrit 15M Mar 4 17:40 change_notes-v2.mv.db
>
> the git_file_diff-v2.mv.db is 73G. is this normal?

I believe you have lots of old and stale data in your cache.
before flush the cache, I just did a "gerrit restart". 

The repo is possibly with lots of changes, therefore lots of old diffs.
Yes, there are a lot of changes, and maybe worse is there are a lot of open changes. 
Reply all
Reply to author
Forward
0 new messages