davideuler / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

Garbage not collected after rewind #540

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create repository and fill it with stuff.
2.Delete unwanted files from commit history with git filter-branch causing 
rewind (i followed this 
https://help.github.com/articles/remove-sensitive-data/, more or less)
3.push --force
4.make sure gc has run on gitblit repo

What is the expected output? What do you see instead?
Repository should get smaller, insted it only got bigger.

What version of the product are you using? On what operating system?
Gitblit GO 1.6.0 on Windows 8.1, java 7.
I haven't seen relevant changes in 1.6.1-2 changelogs, so haven't bothered to 
try.

Please provide any additional information below.
I can see old commits in reflog and enter their trees, which contain files 
purged from history so I guess the culprit is the reflog? I deleted tags 
pointing to old commits, but it did't help. There are no branches other than 
master. Indexing is disabled.
I pushed the repo to gitblit under another name and I can see it's size in 
repository list halved to 508MiB compared to the original of 1GiB. Cloning from 
original repo results in 508MiB local .git folder as expected.
I've enabled automatic GC and seen in the log only 17KiB got collected from the 
original.

I'll switch to my recreated repo, so it's no biggy, but I think gitblit should 
handle this case.

Thanks,
Maciej

Original issue reported on code.google.com by maciej@jagiello.it on 13 Dec 2014 at 2:35

GoogleCodeExporter commented 9 years ago
OK, I've just updated to 1.6.2 and the the size in the list got down from 1GiB 
to 624MiB, which is exactly the size measured of the gitblit's repo folder on 
file system just before update.

Reflog page no longer shows old commits' content, which is a good sign. It 
shows that there were some commits made without other info, as expected.

Original comment by maciej@jagiello.it on 13 Dec 2014 at 3:37

GoogleCodeExporter commented 9 years ago
So is there a problem here?  Doesn't sound like it.  At worst, sounds like a 
caching issue of the calculated repo size.

Original comment by James.Mo...@gmail.com on 26 Feb 2015 at 3:56

GoogleCodeExporter commented 9 years ago
Well, the problem is gone after update so feel free to close this issue.

Just for the record I don't think it was just an issue of the calculated repo 
size because all the commits deleted from history, including content blobs was 
present and accessible from reflog and I couldn't get the repo size down until 
update to 1.6.2 or recreating the repo.
Anyway the problem is gone for me, thanks again.

Original comment by maciej@jagiello.it on 26 Feb 2015 at 6:08

GoogleCodeExporter commented 9 years ago

Original comment by James.Mo...@gmail.com on 26 Feb 2015 at 6:10